Module: HasManyTranslations::Translations

Defined in:
lib/has_many_translations/translations.rb

Overview

An extension module for the has_many association with translations.

Instance Method Summary collapse

Instance Method Details

#by_lang(lang) ⇒ Object

Returns all translations for given language.



6
7
8
# File 'lib/has_many_translations/translations.rb', line 6

def by_lang(lang)
  all(:conditions => "#{aliased_table_name}.locale_code eq '#{lang}'")
end