Class: ExpressTemplates::Components::Forms::ExpressForm
- Inherits:
-
Container
- Object
- Arbre::Component
- Base
- Configurable
- Container
- ExpressTemplates::Components::Forms::ExpressForm
- Includes:
- Capabilities::Resourceful
- Defined in:
- lib/express_templates/components/forms/express_form.rb
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 inherited from Configurable
#build, #config, emits, has_argument, has_option, #required_options
Methods inherited from Base
before_build, #build, builder_method_and_class, #builder_method_name, builder_method_name, contains, descendants, has_attributes, inherited, #initialize, #resource, tag
Constructor Details
This class inherits a constructor from ExpressTemplates::Components::Base
Instance Method Details
#form_action ⇒ Object
30 31 32 |
# File 'lib/express_templates/components/forms/express_form.rb', line 30 def form_action config[:action] || (resource.try(:persisted?) ? resource_path(true) : collection_path) end |
#form_id ⇒ Object
26 27 28 |
# File 'lib/express_templates/components/forms/express_form.rb', line 26 def form_id [config[:id], resource.try(:id)].compact.join('_') end |