Sha256: 65bb1ffa5bf92b44bd6bf469c89ec75ddec991ba7816165c7ccf88ef07f21785

Contents?: true

Size: 757 Bytes

Versions: 3

Compression:

Stored size: 757 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.now[: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.11 lib/generators/administrate/install/templates/application_controller.rb
administrate-0.0.10 lib/generators/administrate/install/templates/application_controller.rb
administrate-0.0.9 lib/generators/administrate/install/templates/application_controller.rb