Module | Cocoon::ViewHelpers |
In: |
lib/cocoon/view_helpers.rb
|
creates new association object with its conditions, like `` has_many :admin_comments, class_name: "Comment", conditions: { author: "Admin" } will create new Comment with author "Admin"
shows a link that will allow to dynamically add a new associated object.
- *:render_options* : options passed to `simple_fields_for, semantic_fields_for or fields_for` - *:locals* : the locals hash in the :render_options is handed to the partial - *:partial* : explicitly override the default partial name - *:wrap_object* : a proc that will allow to wrap your object, especially suited when using decorators, or if you want special initialisation - *:form_name* : the parameter for the form in the nested form partial. Default `f`. - *:count* : Count of how many objects will be added on a single click. Default `1`.
this will show a link to remove the current association. This should be placed inside the partial. either you give
or you use the form without name with a *&block*