module Form::ActiveModel

Public Class Methods

included(base) click to toggle source
# File lib/reform/form/active_model.rb, line 4
def self.included(base)
  base.class_eval do
    extend ClassMethods
    register_feature ActiveModel

    extend Uber::Delegates
    delegates :model, *[:persisted?, :to_key, :to_param, :id] # Uber::Delegates

    def to_model # this is called somewhere in FormBuilder and ActionController.
      self
    end
  end
end

Public Instance Methods

model_name(*args) click to toggle source
# File lib/reform/form/active_model.rb, line 97
def model_name(*args)
  self.class.model_name(*args)
end
to_model() click to toggle source
# File lib/reform/form/active_model.rb, line 12
def to_model # this is called somewhere in FormBuilder and ActionController.
  self
end