class Trailblazer::Rails::Form

Public Class Methods

name() click to toggle source
# File lib/trailblazer/rails/form.rb, line 8
def self.name
  # for whatever reason, validations climb up the inheritance tree and require _every_ class to have a name (4.1).
  "Reform::Form"
end
new(delegated, model_class) click to toggle source
Calls superclass method
# File lib/trailblazer/rails/form.rb, line 3
def initialize(delegated, model_class)
  super(delegated)
  @model_class = model_class
end

Public Instance Methods

model_name() click to toggle source
# File lib/trailblazer/rails/form.rb, line 13
def model_name
  ::ActiveModel::Name.new(self, nil, @model_class.to_s.camelize)
end
to_model() click to toggle source
# File lib/trailblazer/rails/form.rb, line 17
def to_model
  self
end