Module: I18nScopes

Defined in:
lib/i18n_scopes/configuration.rb,
lib/i18n_scopes/scope.rb,
lib/i18n_scopes/version.rb,
lib/i18n_scopes/option_accessor.rb,
lib/i18n_scopes/translation_utils.rb,
lib/i18n_scopes/translation_helper.rb,
lib/i18n_scopes/translation_methods.rb

Overview

extend the I18nScopes module to support configuration see I18nScopes::Configuration

Defined Under Namespace

Modules: OptionAccessor, Scope, TranslationMethods, TranslationUtils Classes: Configuration, TranslationHelper

Constant Summary collapse

VERSION =
"0.3.1"

Class Method Summary collapse

Class Method Details

.configurationObject

returns the Configuration



17
18
19
# File 'lib/i18n_scopes/configuration.rb', line 17

def self.configuration
  @configuration ||= Configuration.new
end

.configure {|self.configuration| ... } ⇒ Object

use this method to configure I18nScopes

I18nScopes.configure do |config|
  config.plural_classes = false
  config.strip_controller_suffix = true
  config.attach_to ActionController::Base, YourCustomClass, EtcClass
end

Yields:



12
13
14
# File 'lib/i18n_scopes/configuration.rb', line 12

def self.configure # :yield: config
  yield self.configuration
end