Created
December 6, 2014 08:11
-
-
Save robinjfisher/8f4a1d8f69d337bff3ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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