Class: Rutema::Model::Scenario
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Rutema::Model::Scenario
- Defined in:
- lib/rutemaweb/model.rb
Class Method Summary collapse
-
.find_on_page(page_num, page_size, conditions = nil) ⇒ Object
The view wants to display scenarios grouped into pages, where each page shows page_size scenarios at a time.
Instance Method Summary collapse
Class Method Details
.find_on_page(page_num, page_size, conditions = nil) ⇒ Object
The view wants to display scenarios grouped into pages, where each page shows page_size scenarios at a time. This method returns the scenarios grouped by name on page page_num (starting at zero).
48 49 50 51 52 53 54 55 |
# File 'lib/rutemaweb/model.rb', line 48 def self.find_on_page(page_num, page_size,conditions=nil) find(:all, :order => "name ASC", :group=>"name", :limit => page_size, :conditions=>conditions, :offset => page_num*page_size) end |
Instance Method Details
#success? ⇒ Boolean
57 58 59 |
# File 'lib/rutemaweb/model.rb', line 57 def success? return self.status=="success" end |