前回、ユーザ認証の機能を導入するところまでできたので、ルーティングを加えてそれっぽく(?)してみます(restful_authentication の本質とは関係ない・・・)。 参考 http://d.hatena.ne.jp/idesaku/20080430/1209579996http://api.rubyonrails.org/classes/ActionController/Routing.html 前回までで、ルーティングのためのヘルパメソッド login_url logout_url signup_url が使えるようになっているので、これらを使います。 まず、認証が必要なコンテンツを作成。 $ script/generate controller secret index secret_controller.rb に before_filter を追加。 # app/cont
![[Railsのキホン][プラグイン] restful_authentication の使いかた (2) ルーティング編](https://cdn-ak-scissors.b.st-hatena.com/image/square/84a7261fd60e85fc03a163286240df52a4716e65/height=288;version=1;width=512/http%3A%2F%2F4.bp.blogspot.com%2F_pWL0uFtCKXo%2FSqOX5C3eQcI%2FAAAAAAAAAFw%2FhU6bGI-rItQ%2Fw1200-h630-p-k-no-nu%2Flogin2.jpg)