Tagged Questions
4
votes
1answer
2k views
How to write html flash messages?
Flash messages are generally composed in the controller. Some times we need those flash messages to have links in them (like an undo button).
How would you go on to compose such a message?
The only ...
2
votes
2answers
86 views
Should view related methods be included in models?
class Submission < ActiveRecord::Base
def get_status_css()
if self.status == IN_PROGRESS
"info"
elsif self.status == FAILED
"error"
elsif self.status == COMPLETED
...
2
votes
1answer
528 views
Should I pass my params from controller to the model?
I have an index with a filter form that submits something like:
{
:only_locked => "yes",
:manufacturer_id => 45,
:order_by => "date",
:tags => ["some", "other"]
}
I want to ...