Class: Views::Resources::Form
- Inherits:
-
Base
- Object
- Base
- Views::Resources::Form
- Defined in:
- app/views/resources/form.rb
Instance Method Summary collapse
Instance Method Details
#available_fields ⇒ Object
21 22 23 24 25 |
# File 'app/views/resources/form.rb', line 21 def available_fields resource.fields.reject do |key, value| key.starts_with?("_") end end |
#body_content ⇒ Object
2 3 4 5 6 7 |
# File 'app/views/resources/form.rb', line 2 def body_content form do |form| fields(form) (form) end end |
#buttons(form) ⇒ Object
15 16 17 18 19 |
# File 'app/views/resources/form.rb', line 15 def (form) div class: 'buttons' do form.submit end end |
#fields(form) ⇒ Object
9 10 11 12 13 |
# File 'app/views/resources/form.rb', line 9 def fields(form) available_fields.each do |key, value| input(form, key, :text_field) end end |