search for: survey_id_from_area

Displaying 1 result from an estimated 1 matches for "survey_id_from_area".

2008 Sep 19
0
validates_uniqueness_of: passing a method to :scope
...s cascade down associated objects. Any ideas on how to pass a method name as the scope option? Then I could add (instead of the above): class Survey def questions find_all_questions.sort_by(:survey_position) end end class Question validates_uniqueness_of :survey_position, :scope => :survey_id_from_area def survey_id_from_area area.survey.id end end Any ideas? ~ Mark -- 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 t...