Giter Site home page Giter Site logo

miletbaker / add_nested_fields Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 3.0 89 KB

Rails ActionView / RJS Helper to work with dynamically adding removing partials for working with accepts_nested_attributes_for

Home Page: http://www.gotripod.com

License: MIT License

Ruby 100.00%

add_nested_fields's People

Contributors

gaqzi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

add_nested_fields's Issues

ReferenceError: Can't find variable: $ when calling add_nested_fields_for

I have a nested model set up and working correctly. Installed plugin and followed instructions. When testing the add link on form there alert
"RJS error:

ReferenceError: Can't find variable: $"

is displayed followed by another alert:
$('locs').insert({ bottom: '<div class="location">\n

\n <label for="contact_locations_attributes_NEW_RECORD_name">Name</label> <input id="contact_locations_attributes_NEW_RECORD_name" name="contact[locations_attributes][NEW_RECORD][name]" size="30" type="text" />\n </p>\n

\n <label for="contact_locations_attributes_NEW_RECORD_address">Address</label> <input id="contact_locations_attributes_NEW_RECORD_address" name="contact[locations_attributes][NEW_RECORD][address]" size="30" type="text" />\n </p>\n

\n <label for="contact_locations_attributes_NEW_RECORD_cost_kwh">Cost kwh</label> <input id="contact_locations_attributes_NEW_RECORD_cost_kwh" name="contact[locations_attributes][NEW_RECORD][cost_kwh]" size="30" type="text" />\n </p>\n</div>'.replace(/NEW_RECORD/g, new Date().getTime()) });

Not working with formtastic

Would be nice if add_nested_fields would work with formtastic. Currently, this plugin cannot handle it (or I can't get it to work..)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.