Class: SettlementsController
- Inherits:
-
ArtfullyOseController
- Object
- ActionController::Base
- ArtfullyOseController
- SettlementsController
- Defined in:
- app/controllers/settlements_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'app/controllers/settlements_controller.rb', line 2 def index unless current_user.current_organization.id.nil? @settlements = current_organization.settlements @settlements.each{|settlement| :view, settlement} @settlements = @settlements.sort{|a,b| b.created_at <=> a.created_at } @settlements = @settlements.paginate(:page => params[:page], :per_page => 25) else @settlements = nil :view, @settlements end end |
#show ⇒ Object
14 15 16 17 |
# File 'app/controllers/settlements_controller.rb', line 14 def show @settlement = Settlement.find(params[:id]) :view, @settlement end |