Class: Polepin::RecordsController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Polepin::RecordsController
- Defined in:
- app/controllers/polepin/records_controller.rb
Instance Method Summary collapse
Instance Method Details
#boolean ⇒ Object
11 12 13 |
# File 'app/controllers/polepin/records_controller.rb', line 11 def boolean @records = record_class.paginate :conditions => ["#{record_class.table_name}.#{boolean_column} = ?", boolean_value], :page => params[:page] end |
#collection ⇒ Object
19 20 21 22 |
# File 'app/controllers/polepin/records_controller.rb', line 19 def collection @record = record_class.find params[:id] @records = @record.send(record_collection) end |
#index ⇒ Object
7 8 9 |
# File 'app/controllers/polepin/records_controller.rb', line 7 def index @records = record_class.paginate :page => params[:page] end |
#show ⇒ Object
15 16 17 |
# File 'app/controllers/polepin/records_controller.rb', line 15 def show @record = record_class.find params[:id] end |