Sha256: a0cc8ec80447bd448149c4e8c7cbf9feb25525c49ee9e1fa63678fe47acf29ae

Contents?: true

Size: 753 Bytes

Versions: 3

Compression:

Stored size: 753 Bytes

Contents

# All Administrate controllers inherit from this `ApplicationController`,
# making it the ideal place to put authentication logic or other
# before_filters.
#
# If you want to add pagination or other controller-level concerns,
# you're free to overwrite the RESTful controller actions.
class Admin::ApplicationController < Administrate::ApplicationController
  before_filter :authenticate_admin

  def authenticate_admin
    # TODO Add authentication logic here.
  end

  def index
    super

    flash[:alert] =
      "For performance, Administrate limits the index page to show 20 items.
      Customize this action to update/remove the limit,
      or implement the pagination library of your choice."
    @resources = @resources.limit(20)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
administrate-0.0.8 lib/generators/administrate/install/templates/application_controller.rb
administrate-0.0.7 lib/generators/administrate/install/templates/application_controller.rb
administrate-0.0.6 lib/generators/administrate/install/templates/application_controller.rb