Class: Resourceable::Inputs::HasManyInput
- Inherits:
-
SimpleForm::Inputs::Base
- Object
- SimpleForm::Inputs::Base
- Resourceable::Inputs::HasManyInput
- Defined in:
- lib/resourceable/inputs/has_many.rb
Instance Method Summary collapse
Instance Method Details
#input ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/resourceable/inputs/has_many.rb', line 5 def input unless partial # TODO: Implement proper exceptions. raise 'You must specify a partial for `has_many` inputs.' end output = ActiveSupport::SafeBuffer.new output << @builder.simple_fields_for(attribute_name )do |ff| ff.input(:id, as: :hidden) + build_inputs(ff) end output end |