solidus
https://github.com/solidusio/solidus
Ruby
🛒 Solidus, the open-source eCommerce framework for industry trailblazers.
Spree::Admin::BaseHelper#generate_html
This method demonstrates the use of the :child_index option to render a
form partial for, for instance, client side addition of new nested
records.
This specific example creates a link which uses javascript to add a new
form partial to the DOM.
<%= form_for @project do |project_form| %>
<div id="tasks">
<%= project_form.fields_for :tasks do |task_form| %>
<%= render :partial => 'task', :locals => { :f => task_form } %>
<% end %>
</div>
<% end %>Edit
git clone [email protected]:solidusio/solidus.git
cd solidus
open backend/app/helpers/spree/admin/base_helper.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Spree--Admin--BaseHelper-generate_html-for-pr
# Commit to gitgit add backend/app/helpers/spree/admin/base_helper.rbgit commit -m "better docs for Spree::Admin::BaseHelper#generate_html"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Spree--Admin--BaseHelper-generate_html-for-pr
hub pull-request
# Celebrate!