# File lib/globalize/active_record/instance_methods.rb, line 14 def self.included(base) # Maintain Rails 3.0.x compatibility while adding Rails 3.1.x compatibility if base.method_defined?(:assign_attributes) base.class_eval %{ def assign_attributes(attributes, options = {}) with_given_locale(attributes) { super } end } else base.class_eval %{ def attributes=(attributes, *args) with_given_locale(attributes) { super } end def update_attributes!(attributes, *args) with_given_locale(attributes) { super } end def update_attributes(attributes, *args) with_given_locale(attributes) { super } end } end end