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


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

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