Sha256: c2ec8d932fabc0c0e0112542be63ca32d33462d4692020f548a56879662c8f8d

Contents?: true

Size: 720 Bytes

Versions: 1

Compression:

Stored size: 720 Bytes

Contents

module I18nDashboard
  class ApplicationController < ::ApplicationController

    layout I18nDashboard.configuration.layout if I18nDashboard.configuration.layout

    # Sets a class method to specify a before-filter calling
    # whatever I18nDashboard.configuration.authentication_method is set to
    # Accepts the usual before_filter optionss
    def self.i18n_dashboard_authenticate(options ={})
      if i18n_dashboard_conf.authentication_method
        before_filter i18n_dashboard_conf.authentication_method, options
      end
    end

    # A helper method to access the I18nDashboard::configuration
    # at the class level
    def self.i18n_dashboard_conf
      I18nDashboard::configuration
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i18n_dashboard-0.1.4 app/controllers/i18n_dashboard/application_controller.rb