Sha256: ad2f000316df97231d7efddb1064bbac899cfdfba4885e1c014112413c5ba4c2

Contents?: true

Size: 568 Bytes

Versions: 13

Compression:

Stored size: 568 Bytes

Contents

module SimpleModelTranslations
  module Attributes
    def attributes=(attributes)
      I18n.with_locale(attributes.delete(:locale) || current_locale_for_translation) do
        super(attributes)
      end
    end

    def update_attributes!(attributes)
      I18n.with_locale(attributes.delete(:locale) || current_locale_for_translation) do
        super(attributes)
      end
    end

    def update_attributes(attributes)
      I18n.with_locale(attributes.delete(:locale) || current_locale_for_translation) do
        super(attributes)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
simple_model_translations-0.2.3 lib/simple_model_translations/attributes.rb
simple_model_translations-0.2.2 lib/simple_model_translations/attributes.rb
simple_model_translations-0.2.1 lib/simple_model_translations/attributes.rb
simple_model_translations-0.2.0 lib/simple_model_translations/attributes.rb
simple_model_translations-0.1.9 lib/simple_model_translations/attributes.rb
simple_model_translations-0.1.8 lib/simple_model_translations/attributes.rb
simple_model_translations-0.1.7 lib/simple_model_translations/attributes.rb
simple_model_translations-0.1.6 lib/simple_model_translations/attributes.rb
simple_model_translations-0.1.4 lib/simple_model_translations/attributes.rb
simple_model_translations-0.1.3 lib/simple_model_translations/attributes.rb
simple_model_translations-0.1.2 lib/simple_model_translations/attributes.rb
simple_model_translations-0.1.1 lib/simple_model_translations/attributes.rb
simple_model_translations-0.1.0 lib/simple_model_translations/attributes.rb