Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Simple nested form for field

I don`t understand this from rails 4:

<td colspan="12" id="compatibility_activities-add" >
    <%= job.link_to_add t('shared.add'), :activities,:class => "right small button radius success", :data => { :target => "#activities#{job.object.person_type}_#{job.index}" } %>
</td>

where does the "link_to_add" comes from? there is no references inside the project and cant find anything on the net, there is another "link_to_remove"

this is on a list that creates new rows or deletes them dynamicaly

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

My second question is, does rails 4 have the way, like laters versions to do rails routes | grep some_route ??

>Solution :

  1. The helper methods you mentioned seem to be provided by the gem Nested Form or some fork of it.
    Check your Gemfile for the specific gem name and you can get the official documentation on GitHub or on its website.

  2. In rails 4, you could try using rake routes or bundle exec rake routes to get the list of the routes.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading