{"action":"closed","issue":{"url":"https://api.github.com/repos/rom-rb/rom/issues/263","labels_url":"https://api.github.com/repos/rom-rb/rom/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/rom-rb/rom/issues/263/comments","events_url":"https://api.github.com/repos/rom-rb/rom/issues/263/events","html_url":"https://github.com/rom-rb/rom/issues/263","id":83863533,"number":263,"title":"Embedded doesn't support from","user":{"login":"dekz","id":27389,"avatar_url":"https://avatars.githubusercontent.com/u/27389?v=3","gravatar_id":"","url":"https://api.github.com/users/dekz","html_url":"https://github.com/dekz","followers_url":"https://api.github.com/users/dekz/followers","following_url":"https://api.github.com/users/dekz/following{/other_user}","gists_url":"https://api.github.com/users/dekz/gists{/gist_id}","starred_url":"https://api.github.com/users/dekz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dekz/subscriptions","organizations_url":"https://api.github.com/users/dekz/orgs","repos_url":"https://api.github.com/users/dekz/repos","events_url":"https://api.github.com/users/dekz/events{/privacy}","received_events_url":"https://api.github.com/users/dekz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-02T06:13:04Z","updated_at":"2015-06-02T06:20:00Z","closed_at":"2015-06-02T06:19:59Z","body":"We may be incorrectly using the the embedded syntax, but we can't use the `from:` option when passing in a mapper when using embedded (and some others).\r\n\r\n```ruby\r\nembedded :cats, from: 'CatDetails', mapper: CatMapper\r\n```\r\n\r\nWe expected that syntax to work in conjunction with a CatMapper:\r\n```ruby\r\nclass CatMapper\r\n  model Cat\r\n  attribute :name, from: 'sillyCateKeyName'\r\nend\r\n```\r\n\r\nThe following code seems to work, but we would prefer to pass mapper instead of always nesting in a block.\r\n\r\n```ruby\r\n    embedded :cats, from: 'CatDetails' do\r\n      model Cat\r\n      attribute :name, from: 'sillyCateKeyName'\r\n    end\r\n```\r\n\r\nIt just seems that the `from:` isn't being passed through in the embedded dsl method.\r\n\r\nIs this intended usage, or have I completely missed something obvious?\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/19656484-embedded-doesn-t-support-from?utm_campaign=plugin&utm_content=tracker%2F155789&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F155789&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}