Hi,
I am facing the same problem and looks like the following construction
works:
booking..to_json(:include => {:booking_state => {}, :customer =>
{include => :customer_phones}})
Not as clean and nice as the expected though:
booking..to_json(:include => [:booking_state, {:customer => {include
=> :customer_phones}}])
So I thought better to share
Cheers
On Jan 21, 7:03 am, Calvin Ng <[email protected]>
wrote:
> Menator,
>
> Have you found a solution for this problem? I am continually running
> into this same error you stated above. It happens whenever I have
> multiple associations that exist at the same level (let's call them
> siblings) with one of them requiring a hash either to further traverse
> down to get deeper associations with a nested :include or when needing
> to specify other options on one of the siblings to qualify one of the
> :methods, :only or :except options.
>
> Please advise if you have found a solution to this issue?
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---