{"comment":{"created_at":"2011-10-22T20:08:13Z","body":"Can you help me with some more information. Are you on Rails 3 or 3.1? Can you try this:\r\n\r\n```\r\nobject @person\r\nattributes :id, :name \r\nchild :cars  do\r\n  attributes :id, :category\r\n  child :message, :if => lambda { |c| c.respond_to?(:message) } do\r\n    attributes :id, :subject \r\n  end\r\nend\r\n```\r\n\r\nand tell me what happens?","updated_at":"2011-10-22T20:08:13Z","url":"https://api.github.com/repos/nesquena/rabl/issues/comments/2492465","id":2492465,"user":{"gravatar_id":"e8a84c62048ccb7ee08d4fdeb6417533","avatar_url":"https://secure.gravatar.com/avatar/e8a84c62048ccb7ee08d4fdeb6417533?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/nesquena","id":6511,"login":"nesquena"}},"action":"created","issue":{"number":131,"created_at":"2011-10-22T19:44:38Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Hi,\r\nthis rabl template was working like charm in v0.3.0 and now breaks with v0.5.0\r\n\r\n    object @person\r\n    attributes :id, :name \r\n    child :cars  do\r\n      attributes :id, :category\r\n      child :message do\r\n        attributes :id, :subject \r\n      end\r\n    end\r\n\r\nHere is the error I get when I use v0.5.0\r\n\r\n    ActionView::Template::Error (undefined method `message' for #<ActiveRecord::Relation:0x00000104db5a38>):\r\n\r\nRelation are set properly, each \"car\" entity have one \"message\", and only one.\r\nIs there any change in the syntax? for now I will stick to v0.3.0\r\n\r\n\r\n","comments":2,"title":"v.0.5.0 changes break working template in v0.3.0","updated_at":"2011-10-22T20:08:13Z","url":"https://api.github.com/repos/nesquena/rabl/issues/131","id":2024152,"assignee":null,"milestone":null,"closed_at":null,"user":{"gravatar_id":"e474907b6e23150ba2f2e03ac5b74320","avatar_url":"https://secure.gravatar.com/avatar/e474907b6e23150ba2f2e03ac5b74320?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/alphatester","id":801383,"login":"alphatester"},"html_url":"https://github.com/nesquena/rabl/issues/131","labels":[],"state":"open"},"legacy":{"issue_id":2024152,"comment_id":2492465}}