You can avoid getting the table name - which I take it is "booking" in 
your case - by telling ActiveRecord not to include that with the 
following code

ActiveRecord::Base.include_root_in_json = false

You can filter the fields you want in your database query and then 
to_json on the query result should give you what you need without the 
table name.

-S

-- 
Posted via http://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
-~----------~----~----~----~------~----~------~--~---

Reply via email to