Flowdock
method

register_detail

Importance_0
v3.0.0 - Show latest stable - 0 notes - Class: ActionView::LookupContext
register_detail(name, options = {}, &block) public

No documentation

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

Hide source
# File actionpack/lib/action_view/lookup_context.rb, line 21
    def self.register_detail(name, options = {}, &block)
      self.registered_details << name
      self.registered_detail_setters << [name, "#{name}="]

      Accessors.send :define_method, "_#{name}_defaults""_#{name}_defaults", &block
      Accessors.module_eval "def \#{name}\n@details[:\#{name}]\nend\n\ndef \#{name}=(value)\nvalue = Array.wrap(value.presence || _\#{name}_defaults)\n_set_detail(:\#{name}, value) if value != @details[:\#{name}]\nend\n", __FILE__, __LINE__ + 1
    end
Register or log in to add new notes.