Class: ActionController::Routing::RouteSet::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/i18n_routing_rails2.rb

Instance Method Summary collapse

Instance Method Details

#localized(locales = I18n.available_locales, opts = {}) ⇒ Object



41
42
43
44
45
46
47
48
# File 'lib/i18n_routing_rails2.rb', line 41

def localized(locales = I18n.available_locales, opts = {})
  old_value = @set.locales
  @set.locales = locales
  @set.i18n_verbose ||= opts.delete(:verbose)
  yield
ensure
  @set.locales = old_value
end