register_detail(name, &block) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/lookup_context.rb, line 21
    def self.register_detail(name, &block)
      registered_details << name
      Accessors::DEFAULT_PROCS[name] = block

      Accessors.define_method(:"default_#{name}", &block)
      Accessors.module_eval         def #{name}          @details[:#{name}] || []        end        def #{name}=(value)          value = value.present? ? Array(value) : default_#{name}          _set_detail(:#{name}, value) if value != @details[:#{name}]        end, __FILE__, __LINE__ + 1
    end
Register or log in to add new notes.