Sha256: 1173f0ee1b2cf00e15690b2182f983e25c9d0068b5ed31fdc6ed8c3560410c5b

Contents?: true

Size: 586 Bytes

Versions: 33

Compression:

Stored size: 586 Bytes

Contents

class SettlementsController < ArtfullyOseController
  def index
    unless current_user.current_organization.id.nil?
      @settlements = current_organization.settlements
      @settlements.each{|settlement| authorize! :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
      authorize! :view, @settlements
    end
  end

  def show
    @settlement = Settlement.find(params[:id])
    authorize! :view, @settlement
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
artfully_ose-1.2.0 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.beta.1 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.alpha.2 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.alpha.1 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.27 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.26 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.24 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.23 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.21 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.20 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.19 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.18 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.17 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.16 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.15 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.12 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.11 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.10 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.9 app/controllers/settlements_controller.rb
artfully_ose-1.2.0.pre.8 app/controllers/settlements_controller.rb