Created
March 29, 2012 08:41
-
-
Save amardaxini/2235072 to your computer and use it in GitHub Desktop.
Serialize Options
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
#If you have config1 as serialize parameter it store hash than | |
# serialize :config1,Hash | |
<%= form_tag(@user_config) do |f| %> | |
<%= text_field_tag "user_config[config1][test2]" %> | |
<%= text_field_tag "user_config[config1][test1]" %> | |
<%= submit_tag %> | |
<% end %> | |
# Now you have an array | |
<%= form_tag(@user_config) do |f| %> | |
<%= text_field_tag "user_config[][config1]" %> | |
<%= text_field_tag "user_config[][config1]" %> | |
<%= submit_tag %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment