Class: SurveySection
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- SurveySection
- Defined in:
- app/models/survey_section.rb
Instance Method Summary collapse
Instance Method Details
#next ⇒ Object
10 11 12 |
# File 'app/models/survey_section.rb', line 10 def next SurveySection.find(:first, :conditions => ["display_order > ? and survey_id = ?",self.display_order, self.survey_id], :order => "display_order ASC") end |
#previous ⇒ Object
14 15 16 |
# File 'app/models/survey_section.rb', line 14 def previous SurveySection.find(:first, :conditions => ["display_order < ? and survey_id = ?",self.display_order, self.survey_id], :order => "display_order DESC") end |