Questions tagged [cocoon-gem]

Cocoon makes creating dynamic nested forms using jQuery easy. It works with formtastic, simple_form, and default forms.

Useful links for Cocoon

499 questions
-1
votes
1 answer

sum of deep nested form attributes

rails 4 + cocoon A little background: orders has_many order_products order_products has_many product_sizes In an after_save call I would like to get the total quantity of all the products. I have a database column named total_qty in the…
DhatchXIX
  • 437
  • 1
  • 3
  • 17
-1
votes
1 answer

Cocoon gem showing rating for only first field

I am developing an app that allows HR Managers rate candidates based on key indicators. I use cocoon gem to add the indicators per candidate and ratyjs to add star rating. But unfortunately, the star shows only on the first field because cocoon gem…
Fatimah
  • 722
  • 7
  • 16
-1
votes
1 answer

NoMethodError in Index: How to Define the Nested Attributes?

NoMethodError in Quantifieds#index undefined method `date_value' for #Quantified:0x007ff3fe7d6c08 How do I define date_value & result_value so it works in the quantifieds index?
-1
votes
2 answers

Removing items from nested forms inserts instead of delete

I'm currently using cocoon rails gem to create nested forms. The problem happens when I edit the "father" entity and remove some nested items, it adds another one instead of removing it. I created a gist file that explains it better with ruby on…
msmosso
  • 15
  • 5
1 2 3
33
34