Riccardo Tacconi wrote: > I what to try this method in a helper class: > > def moderator_buttons? > return true if params[:question_status] == 'HOST_INBOX' > return true if params[:question_status] == 'HOST_INBOX_READ' > return true if params[:question_status] == 'DELETED' > return true if params[:question_status] == 'LATER' > return true if params[:question_status] == 'MODERATOR_TO_APPROVE' > > false > end
No you don't. Your helpers don't have access to params, since they live in the view layer. You'll need to pass params[:question_status] in as an @instance variable. Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

