Class: ExpressTemplates::Components::Forms::Submit

Inherits:
FormComponent show all
Defined in:
lib/express_templates/components/forms/submit.rb

Instance Attribute Summary

Attributes inherited from Expander

#handlers, #locals, #stack, #template

Instance Method Summary collapse

Methods inherited from FormComponent

#compile, #field_name, #field_name_attribute, #field_wrapper_class, #label_name, #label_text, #parent_form, #resource_class, #resource_name, #resource_var

Methods included from Capabilities::Adoptable

included

Methods included from Capabilities::Configurable

included

Methods inherited from Base

inherited

Methods included from Capabilities::Iterating

included

Methods included from Capabilities::Wrapping

included

Methods included from Capabilities::Rendering

included

Methods included from Capabilities::Templating

included

Methods included from Macro

included

Methods inherited from Expander

#expand, #initialize, #initialize_expander, #method_missing, #process_children!, register_macros_for

Constructor Details

This class inherits a constructor from ExpressTemplates::Expander

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ExpressTemplates::Expander

Instance Method Details

#html_optionsObject



20
21
22
# File 'lib/express_templates/components/forms/submit.rb', line 20

def html_options
  @config
end

#valueObject



12
13
14
15
16
17
18
# File 'lib/express_templates/components/forms/submit.rb', line 12

def value
  if @args.first.is_a?(String)
    @args.first
  else
    'Save'
  end
end