All Versions
36
Latest Version
Avg Release Cycle
225 days
Latest Release
845 days ago

Changelog History
Page 3

  • v1.0.20 Changes

    • ๐Ÿ‘Œ improved handing of the :partial: remove the extra options-hash, and just make it use the single hash, so now we can just write

      = link_to_add_association 'add something', f, :tasks, :partial => 'shared/task_fields' = link_to_add_association 'add something', f, :tasks, :class => 'your-special-class', :partial => 'shared/task_fields'

  • v1.0.19 Changes

    • ๐Ÿ›  pull #53 (@CuriousCurmudgeon): fixed some bugs introduced in previous version (ooooops! Thanks!!!)
  • v1.0.18 Changes

    • pull in #51 (@erwin): adding an after-removal-callback in javascript, very useful if you want to recalculate e.g. total-items or indexes
    • pull in #42 (@zacstewart): allow to hand extra :locals to the partial
    • ๐Ÿ“š updated documentation
  • v1.0.17 Changes

    • ๐Ÿ›  fix: make sure that cocoon still works for rails 3.0, where the conditions is not available yet
  • v1.0.16 Changes

    • ๐Ÿ”€ merged pull request #33 (@fl00r): added the a custom partial option! genius :) Also the creation of the nested objects takes any available conditions into account. Now you can write

      = link_to_add_association 'add something', f, :tasks, {}, :partial => 'shared/task_fields'

  • v1.0.15 Changes

    • โž• added data-association-insertion-method that gives more control over where to insert the new nested fields. It takes a jquery method as parameter that inserts the new data. before, after, append, prepend, etc. Default: before.
    • ๐Ÿ—„ data-association-insertion-position is still available and acts as an alias. Probably this will be deprecated in the future.
  • v1.0.14 Changes

    • When playing with simple_form and twitter-bootstrap, I noticed it is crucial that I call the correct nested-fields function. That is: fields_for for standard forms, semantic_fields_for in formtastic and simple_fields_for for simple_form. Secondly, this was not enough, I needed to be able to hand down options to that method. So in the link_to_add_association method you can now an extra option :render_options and that hash will be handed to the association-builder.

    This allows the nested fields to be built correctly with simple_form for twitter-bootstrap.

  • v1.0.13 Changes

    • A while ago we added the option to add a javascript callback on inserting a new associated object, I now made sure we can add a callback on insertion and on removal of a new item. One example where this was useful for me is visible in the demo project cocoon_simple_form_demo where I implemented a belongs_to relation, and either select from a list, or add a new element. So: the callback-mechanism has changed, and now the callback is bound to the parent container, instead of the link itself. This is because we can also bind the removal callback there (as the removal link is inserted in the html dynamically).

    For more info, see the README.

  • v1.0.12 Changes

    • using "this" in association-insertion-node is now possible

    ๐Ÿš… If you are using rails < 3.1, you should run

    rails g cocoon:install
    

    to install the new cocoon.js to your public/javascripts folder.

  • v1.0.11