Module: Globalize::ActiveRecord::HasManyExtensions

Defined in:
lib/globalize/active_record/act_macro.rb

Instance Method Summary collapse

Instance Method Details

#find_or_initialize_by_locale(locale) ⇒ Object



90
91
92
# File 'lib/globalize/active_record/act_macro.rb', line 90

def find_or_initialize_by_locale(locale)
  with_locale(locale.to_s).first || build(:locale => locale.to_s)
end