Class: RedisDictionary::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/redis_dictionary/application_controller.rb

Direct Known Subclasses

TranslationsController

Class Method Summary collapse

Class Method Details

.redis_dictionary_authenticate(options = {}) ⇒ Object

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



11
12
13
14
15
# File 'app/controllers/redis_dictionary/application_controller.rb', line 11

def self.redis_dictionary_authenticate(options ={})
  if redis_dictionary_conf.authentication_method
    before_filter redis_dictionary_conf.authentication_method, options
  end
end

.redis_dictionary_confObject

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



19
20
21
# File 'app/controllers/redis_dictionary/application_controller.rb', line 19

def self.redis_dictionary_conf
  RedisDictionary::configuration
end