Module: Wheels::ActiveRecordExtensions

Defined in:
lib/wheels/active_record_extensions.rb

Instance Method Summary collapse

Instance Method Details

#form_attributes(attrib = {}, options = {}) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/wheels/active_record_extensions.rb', line 3

def form_attributes(attrib={}, options={})
  @form_attributes = attrib
  class_eval do
    def form_fields
      self.class.instance_variable_get('@form_attributes')
    end
  end
end