Class: ExpressTemplates::Components::Forms::ExpressForm
- Includes:
- Capabilities::Resourceful
- Defined in:
- lib/express_templates/components/forms/express_form.rb
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
Methods included from Capabilities::Resourceful
included, #namespace, #path_prefix, #resource_class
Methods inherited from Container
#appended, appends, #call_block, #prepended, prepends
Methods included from Capabilities::Hideable
Methods included from Capabilities::Configurable
Methods inherited from Base
abstract_component, abstract_component?, before_build, #build, builder_method, builder_method_and_class, contains, descendants, has_attributes, inherited, #initialize, require_parent, required_parent, tag
Constructor Details
This class inherits a constructor from ExpressTemplates::Components::Base
Instance Method Details
#form_action ⇒ Object
37 38 39 |
# File 'lib/express_templates/components/forms/express_form.rb', line 37 def form_action config[:action] || (resource.try(:persisted?) ? resource_path(resource) : collection_path) end |
#form_enctype ⇒ Object
41 42 43 |
# File 'lib/express_templates/components/forms/express_form.rb', line 41 def form_enctype config[:enctype] end |
#form_id ⇒ Object
33 34 35 |
# File 'lib/express_templates/components/forms/express_form.rb', line 33 def form_id [config[:id], resource.try(:id)].compact.join('_') end |