Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a form to populate a deeply-nested hstore #19

Open
sscirrus opened this issue Dec 26, 2015 · 0 comments
Open

Use a form to populate a deeply-nested hstore #19

sscirrus opened this issue Dec 26, 2015 · 0 comments

Comments

@sscirrus
Copy link

I'm trying to figure out how to use fields in a form to populate parts of my hstore field.
Here's the data in the hstore:

custom = {
  "settings" => {
    "search" => ?,
    "start" => ?
  }
}

What works (not ideal):

<%= f.text_area :custom %>

What doesn't work (and what I need)

<%= f.text_field "custom[settings][search]" %>
<%= f.text_field "custom[settings][start]" %>

I asked this question last night on SO but no answers yet:
http://stackoverflow.com/questions/34470564/use-a-form-to-populate-a-deeply-nested-hstore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant