- #
- D
- F
- L
- S
- U
- W
[RW] | cache |
Temporary skip passing the details_key forward.
Overload formats= to expand [“/”] values and automatically add :html as fallback to :js.
Overload locale to return a symbol instead of array.
Overload locale= to also set the I18n.locale. If the current I18n.config object responds to original_config, it means that it’s has a copy of the original I18n configuration and it’s acting as proxy, which we need to skip.
# File actionpack/lib/action_view/lookup_context.rb, line 194 def locale=(value) if value config = I18n.config.respond_to?(:original_config) ? I18n.config.original_config : I18n.config config.locale = value end super(@skip_default_locale ? I18n.locale : _locale_defaults) end
Do not use the default locale on template lookup.
Update the details keys by merging the given hash into the current details hash. If a block is given, the details are modified just during the execution of the block and reverted to the previous value after.
# File actionpack/lib/action_view/lookup_context.rb, line 223 def update_details(new_details) old_details = @details.dup registered_detail_setters.each do |key, setter| send(setter, new_details[key]) if new_details.key?(key) end begin yield ensure @details_key = nil @details = old_details end end
A method which only uses the first format in the formats array for layout lookup. This method plays straight with instance variables for performance reasons.