Sha256: 917c37acc4d4b794dd6545c90e06a085d2fe5c333da5e405455f460c4ef8955c

Contents?: true

Size: 444 Bytes

Versions: 12

Compression:

Stored size: 444 Bytes

Contents

module Gossiper
  class ApplicationController < ActionController::Base

    if respond_to?(:before_action)
      before_action :gossiper_authorization
    else
      before_filter :gossiper_authorization
    end

    def gossiper_authorization
      instance_eval(&Gossiper.configuration.authorize_with)
    end

    def page
      params[:page].presence || 1
    end

    def per_page
      params[:per_page].presence ||  25
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gossiper-0.5.2 app/controllers/gossiper/application_controller.rb
gossiper-0.5.1 app/controllers/gossiper/application_controller.rb
gossiper-0.5.0 app/controllers/gossiper/application_controller.rb
gossiper-0.3.8 app/controllers/gossiper/application_controller.rb
gossiper-0.3.7 app/controllers/gossiper/application_controller.rb
gossiper-0.3.6 app/controllers/gossiper/application_controller.rb
gossiper-0.3.5 app/controllers/gossiper/application_controller.rb
gossiper-0.3.4 app/controllers/gossiper/application_controller.rb
gossiper-0.3.3 app/controllers/gossiper/application_controller.rb
gossiper-0.3.2 app/controllers/gossiper/application_controller.rb
gossiper-0.3.1 app/controllers/gossiper/application_controller.rb
gossiper-0.3.0 app/controllers/gossiper/application_controller.rb