Class: I18nDashboard::ApplicationController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/i18n_dashboard/application_controller.rb

Direct Known Subclasses

TranslationsController

Class Method Summary collapse

Class Method Details

.i18n_dashboard_authenticate(options = {}) ⇒ Object

Sets a class method to specify a before-filter calling whatever I18nDashboard.configuration.authentication_method is set to Accepts the usual before_filter optionss



9
10
11
12
13
# File 'app/controllers/i18n_dashboard/application_controller.rb', line 9

def self.i18n_dashboard_authenticate(options ={})
  if i18n_dashboard_conf.authentication_method
    before_filter i18n_dashboard_conf.authentication_method, options
  end
end

.i18n_dashboard_confObject

A helper method to access the I18nDashboard::configuration at the class level



17
18
19
# File 'app/controllers/i18n_dashboard/application_controller.rb', line 17

def self.i18n_dashboard_conf
  I18nDashboard::configuration
end