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