railstutorial.org has a suggestion which strikes me as a little odd.
Here:
http://ruby.railstutorial.org/chapters/sign-in-sign-out#code:sessions_helper_include
... it suggests this code:
class ApplicationController < ActionController::Base
protect_from_forgery
include SessionsHelper
end
...making SessionsHelper available essentially everywhere. I
understand that authentication/authorization is cross-cutting, but is
this really the best place? Would functionality not strictly needed in
views be better placed in ApplicationController or elsewhere?
Thoughts?
Thanks,
-Craig
--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment