Sha256: 32f19c68372091e5f197001aba296af3745bddf36e60dbce6f84f775479024c7

Contents?: true

Size: 380 Bytes

Versions: 23

Compression:

Stored size: 380 Bytes

Contents

require_relative '../application_controller'

module Admin
  class ApplicationController < ::ApplicationController
    before_action :authenticate!
    before_action :pagination, only: [:index]

    helper_method :posts

    def posts
      @posts ||= Post.all
    end

    protected

    def pagination
      params[:per_page] ||= 10
      params[:page] ||= 1
    end

  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
ecrire-0.31.2 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.31.1 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.31.0 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.30.3 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.30.2 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.30.1 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.30.0 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.29.0 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.28.3 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.28.2 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.28.1 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.28.0 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.27.0 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.26.3 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.26.2 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.26.1 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.26.0 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.25.2 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.25.1 lib/ecrire/app/controllers/admin/application_controller.rb
ecrire-0.25.0 lib/ecrire/app/controllers/admin/application_controller.rb