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.
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.
They do - ActionView::Base delegates the params method (among others)
to the controller
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.
They do - ActionView::Base delegates the params method (among others)
to the controller
OK, then I’m sorry for the error. I still can’t see why it’s ever a
good idea to touch the params array in the view…
…though I suppose you could make the argument that the controller
shouldn’t have to know it needs to set @question_status.