Last active
August 29, 2015 14:03
-
-
Save advorak/6932af6fde7f32367fb1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class CardsController | |
def create | |
render params.inspect | |
end | |
end | |
# Submitted, this yields: | |
# { "cards" => [ { "black" => ["Edit this new black card text..."] } ] } | |
# I want to yield this: | |
# { "cards" => { "black" => ["Edit this new black card text..."] } } | |
# How can I change the index.html.haml text_area_tag "cards[]black[]" to get it to produce the results I expect? |
This file contains hidden or 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
= form_tag '/cards' do | |
= text_area_tag "cards[]black[]", "Edit this new black card text...", class: 'card hidden' | |
= submit_tag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment