{"action":"created","issue":{"url":"https://api.github.com/repos/TrestleAdmin/trestle/issues/136","repository_url":"https://api.github.com/repos/TrestleAdmin/trestle","labels_url":"https://api.github.com/repos/TrestleAdmin/trestle/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/TrestleAdmin/trestle/issues/136/comments","events_url":"https://api.github.com/repos/TrestleAdmin/trestle/issues/136/events","html_url":"https://github.com/TrestleAdmin/trestle/issues/136","id":345505569,"node_id":"MDU6SXNzdWUzNDU1MDU1Njk=","number":136,"title":"fields_for not showing","user":{"login":"andrewjleonard","id":8408350,"node_id":"MDQ6VXNlcjg0MDgzNTA=","avatar_url":"https://avatars3.githubusercontent.com/u/8408350?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewjleonard","html_url":"https://github.com/andrewjleonard","followers_url":"https://api.github.com/users/andrewjleonard/followers","following_url":"https://api.github.com/users/andrewjleonard/following{/other_user}","gists_url":"https://api.github.com/users/andrewjleonard/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewjleonard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewjleonard/subscriptions","organizations_url":"https://api.github.com/users/andrewjleonard/orgs","repos_url":"https://api.github.com/users/andrewjleonard/repos","events_url":"https://api.github.com/users/andrewjleonard/events{/privacy}","received_events_url":"https://api.github.com/users/andrewjleonard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-29T06:18:49Z","updated_at":"2018-07-29T10:05:58Z","closed_at":null,"author_association":"NONE","body":"Hey, absolutely loving Trestle!\r\n\r\nI'm stuck with something that should work.. The following code does not show any nested fields.\r\n\r\n```\r\nclass Customer < ApplicationRecord\r\n  has_one :address, dependent: :destroy\r\n  accepts_nested_attributes_for :address\r\n```\r\n\r\n```\r\n  form do |customer|\r\n    text_field :name\r\n    text_field :email\r\n    fields_for :address do\r\n      text_field :number_and_street\r\n      text_field :suburb\r\n      text_field :state\r\n      text_field :country\r\n      text_field :post_code\r\n    end\r\n  end\r\n```\r\n\r\nI've had a look at #19 and still lost. Any help would be appreciated!"},"comment":{"url":"https://api.github.com/repos/TrestleAdmin/trestle/issues/comments/408665657","html_url":"https://github.com/TrestleAdmin/trestle/issues/136#issuecomment-408665657","issue_url":"https://api.github.com/repos/TrestleAdmin/trestle/issues/136","id":408665657,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODY2NTY1Nw==","user":{"login":"spohlenz","id":7600,"node_id":"MDQ6VXNlcjc2MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/7600?v=4","gravatar_id":"","url":"https://api.github.com/users/spohlenz","html_url":"https://github.com/spohlenz","followers_url":"https://api.github.com/users/spohlenz/followers","following_url":"https://api.github.com/users/spohlenz/following{/other_user}","gists_url":"https://api.github.com/users/spohlenz/gists{/gist_id}","starred_url":"https://api.github.com/users/spohlenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spohlenz/subscriptions","organizations_url":"https://api.github.com/users/spohlenz/orgs","repos_url":"https://api.github.com/users/spohlenz/repos","events_url":"https://api.github.com/users/spohlenz/events{/privacy}","received_events_url":"https://api.github.com/users/spohlenz/received_events","type":"User","site_admin":false},"created_at":"2018-07-29T10:05:58Z","updated_at":"2018-07-29T10:05:58Z","author_association":"MEMBER","body":"As long as you have the `accepts_nested_attributes_for :address` line in your Customer model, then Rails should be automatically converting the input field names to `customer[address_attributes][field]`. It sounds like the input names are coming through as `customer[address][field]` which will cause that error.\r\n\r\nI would double-check that the `accepts_nested_attributes_for` line is in place and that there are no typos in the association name. You might also want to try restarting the Rails server in case there is a code reloading issue at play."}}
{"actor":{"display_login":"spohlenz"}}