> Another point, it might be worth providing a method somewhere called
> current_user (possibly in application_controller) that does the find,
> then you will not need to keep typing the find everywhere you want
> current_user.

I'm trying to do exactly that, but the app doesn't seem to find the 
session if placed on the application controller.

ACCOUNTS_CONTROLLER (works fine)
User.find(session[:user_id]).account.name

APPLICATION_CONTROLLER (error!)
User.find(session[:user_id]).account.name

ERROR
Couldn't find User without an ID

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to