Skip to content

Instantly share code, notes, and snippets.

@robinjfisher
Created December 6, 2014 08:11
Show Gist options
  • Save robinjfisher/8f4a1d8f69d337bff3ac to your computer and use it in GitHub Desktop.
Save robinjfisher/8f4a1d8f69d337bff3ac to your computer and use it in GitHub Desktop.
# View
<%= form_tag '/flash_cards/create' %>
...other form content e.g. body...
<%= text_field_tag 'line1[body]' %>
<%= check_box_tag 'line1[centred]' %>
<%= text_field_tag 'line2[body]' %>
<%= check_box_tag 'line2[centred]' %>
<%= submit_tag "Submit" %>
# Controller
def create
lines = Array.new
line1 = Array.new
params[:line1].each do |param|
line1 << param
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment