Displaying 1 result from an estimated 1 matches for "name_status".
Did you mean:
frame_status
2006 Jun 30
0
Three ActiveRecord features we want at work - any comments/suggestions?
...;'
Now I''ve sort of dreamed up syntax for this, along the lines of:
class SurveyResult < ActiveRecord::Base
#has_one :survey_result_name # get rid of this
acts_as_optional :name
end
sr = SurveyResult.find(:first)
sr.name = ''William''
sr.name_status
=> :present
sr.name_missing :requested_deleted
sr.name_status
=> :requested_deleted
The *_status and *_missing methods I suppose you can create easy
enough in the acts_as_optional call or via an extension to
method_missing.
I''m not sure what to do in the case of...