Module: Gaigo::HasLocale

Defined in:
lib/gaigo/has_locale.rb

Instance Method Summary collapse

Instance Method Details

#has_locale!(*args) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/gaigo/has_locale.rb', line 6

def has_locale!(*args)
  options = args.extract_options!
  class_attribute :_locales unless defined?(_locales)
  self._locales = LANGS.copy(*args)
  unless respond_to?(:has_locale?)
    unless options[:accessible] == false
      attr_accessible :locale
    end
  end
  include Localized
end