Sha256: 4557b7de2e64beeb932973fa62c697a00eed90aa73dd3d4c7f5b96f05532c540

Contents?: true

Size: 552 Bytes

Versions: 31

Compression:

Stored size: 552 Bytes

Contents

class Admin::GroupsController < Admin::ResourceController
  helper :reader
  paginate_models
  skip_before_filter :load_model
  before_filter :load_model, :except => :index    # we want the filter to run before :show too
  
  def show
    
  end
  
  def load_models
    self.models = paginated? ? model_class.roots.paginate(pagination_parameters) : model_class.roots.all
  end
  
  def load_model
    self.model = if params[:id]
      model_class.find(params[:id])
    else
      model_class.new(:parent_id => params[:parent_id])
    end
  end
  
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
radiant-reader-extension-3.0.35 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.33 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.32 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.31 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.30 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.29 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.28 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.27 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.26 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.25 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.24 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.23 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.20 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.19 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.18 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.17 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.16 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.15 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.14 app/controllers/admin/groups_controller.rb
radiant-reader-extension-3.0.13 app/controllers/admin/groups_controller.rb