Skip to content

Instantly share code, notes, and snippets.

@advorak
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save advorak/6932af6fde7f32367fb1 to your computer and use it in GitHub Desktop.
Save advorak/6932af6fde7f32367fb1 to your computer and use it in GitHub Desktop.
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?
= 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