Am I unable to use 'user_signed_in'? In my application controller, and wonder if anyone knew how to fix it.
This works fine in my thoughts, but in my application controller, I
NoMethodError # index undefined method in PostsController `user_signed_in? For ApplicationController: Class Many people had this problem at Rail 3.0.3, but I am using Rail 2.3.8. The suggested fix was to use devise_for: The user in his routes. RB but this results in
internal server error inadequate method `devise_for 'for main: object help will be highly appreciated
Thanks
How do I use a victure with 2.38
== & gt; Application_controller.rb & lt; == Protect protected def unless user.find_by_id (session [: user_id]) session [: original_uri] = request.request_uri flash [: notice] = "please log in!" Redirect_to: Controller = & gt; 'Administrator' ,: verb = & gt; 'Login' End End End Then each Controller, e.g. Food_items: Class FoodItemsController & lt; ApplicationController before_filter: Authorize, excluding & gt; [: Index, show] # For all the ways except ... #GET / food_items A slightly different approach may be helpful.
Comments
Post a Comment