# File lib/globalize/active_record/instance_methods.rb, line 210 def with_given_locale(attributes, &block) attributes.symbolize_keys! if attributes.respond_to?(:symbolize_keys!) locale = respond_to?(:locale=) ? attributes.try(:[], :locale) : attributes.try(:delete, :locale) if locale Globalize.with_locale(locale, &block) else yield end end