Class: Vapid::Controllers::DashboardController::RecordFormBuilder
- Inherits:
-
Padrino::Helpers::FormBuilder::AbstractFormBuilder
- Object
- Padrino::Helpers::FormBuilder::AbstractFormBuilder
- Vapid::Controllers::DashboardController::RecordFormBuilder
- Defined in:
- lib/vapid/controllers/dashboard_controller.rb
Overview
Custom form builder for records
Instance Method Summary collapse
Instance Method Details
#vp_field(name, type, value = "") ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/vapid/controllers/dashboard_controller.rb', line 10 def vp_field(name, type, value = "") @directive = Directives[type] @name = name @value = @directive.new(name).send :deserialize_input, value label(name, caption: "#{name.to_s.humanize}") + template.content_tag(:div) do form_field + preview + destroy end end |