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



38
39
40
# File 'lib/globalize/active_record/act_macro.rb', line 38

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