Module: Sequel::Plugins::Forme::InstanceMethods
- Defined in:
- lib/sequel/plugins/forme.rb
Instance Method Summary collapse
-
#forme_config(form) ⇒ Object
Configure the
formwith support forSequel::Modelspecific code, such as support for nested attributes. -
#forme_input(form, field, opts) ⇒ Object
Return
Forme::Inputinstance based on the given arguments.
Instance Method Details
#forme_config(form) ⇒ Object
Configure the form with support for Sequel::Model specific code, such as support for nested attributes.
488 489 490 491 492 493 |
# File 'lib/sequel/plugins/forme.rb', line 488 def forme_config(form) form.extend(SequelForm) form.nested_associations = [] form.namespaces = [model.send(:underscore, model.name)] form.extend(SinatraSequelForm) if defined?(::Forme::Sinatra::Form) && form.is_a?(::Forme::Sinatra::Form) end |
#forme_input(form, field, opts) ⇒ Object
Return Forme::Input instance based on the given arguments.
496 497 498 |
# File 'lib/sequel/plugins/forme.rb', line 496 def forme_input(form, field, opts) SequelInput.new(self, form, field, opts).input end |