class Submission < ActiveRecord::Base
def get_status_css()
if self.status == IN_PROGRESS
"info"
elsif self.status == FAILED
"error"
elsif self.status == COMPLETED
"success"
else
"warning"
end
end
end
Submission is a model class and it has a method that returns css variables based on its status. Is this correct in the MVC architecture? I was thinking that since get_status_css
is a method that is related to view, it shouldn't belong to a model class. Perhaps it should be put in the controller?