lib/globalize/active_record/adapter.rb
# The cache caches attributes that already were looked up for read access.
# The stash keeps track of new or changed values that need to be saved.
The cache caches attributes that already were looked up for read access.
The stash keeps track of new or changed values that need to be saved.
The cache caches attributes that already were looked up for read access . The stash keeps track of new or changed values that need to be saved .
def save_translations!
        stash.each do |locale, attrs|
          if attrs.any?
            translation = record.translations.find_or_initialize_by_locale(locale.to_s)
            attrs.each { |name, value| translation[name] = value }
            translation.save!
          end
        end
        record.translations.each(&:reload)
        record.translations.reset
        reset
      end
def save_translations! stash . each do | locale , attrs | if attrs . any? translation = record . translations . find_or_initialize_by_locale ( locale . to_s ) attrs . each { | name , value | translation [ name ] = value } translation . save! end end record . translations . each ( & :reload ) record . translations . reset reset end
The cache caches attributes that already were looked up for read access.
The cache caches attributes that already were looked up for read access .