app/models/loop_item_name.rb
#fetchs the item_name in language or the default item name. (Through loop_item_name_fields)
fetchs the item_name in language or the default item name.
fetchs the item_name in language or the default item name .
def item_name language=nil
    if language
      result = self.loop_item_name_fields.find{ |f| f.language == language }
    end
    result ||= self.loop_item_name_fields.find{ |f| f.is_default_language }
    result.try(:item_name)
  end
def item_name language = nil if language result = self . loop_item_name_fields . find { | f | f . language == language } end result ||= self . loop_item_name_fields . find { | f | f . is_default_language } result . try ( :item_name ) end
fetchs the item_name in language or the default item name.
fetchs the item_name in language or the default item name .
language