Class: CaringForm::Field::Submit

Inherits:
Base
  • Object
show all
Defined in:
lib/caring_form/field/submit.rb

Defined Under Namespace

Classes: Renderer

Instance Attribute Summary collapse

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#default_label, #input_properties, register

Constructor Details

#initialize(*args) ⇒ Submit

Returns a new instance of Submit.



64
65
66
67
# File 'lib/caring_form/field/submit.rb', line 64

def initialize(*args)
  super
  self.primary ||= false
end

Instance Attribute Details

#propertiesObject

Returns the value of attribute properties.



62
63
64
# File 'lib/caring_form/field/submit.rb', line 62

def properties
  @properties
end

Instance Method Details

#apply_to_model(klass) ⇒ Object



69
70
71
# File 'lib/caring_form/field/submit.rb', line 69

def apply_to_model(klass)
  raise "BUG ALERT: I shouldn't be called, I'm a submit"
end

#render(form, builder, options = {}) ⇒ Object



73
74
75
76
# File 'lib/caring_form/field/submit.rb', line 73

def render(form, builder, options = {})
  options = normalize_options(form, options)
  Renderer.new(self, form, builder.template, options).render
end

#simple_typeObject



78
79
80
# File 'lib/caring_form/field/submit.rb', line 78

def simple_type
  :none
end