Rails 3 basic Get JSON with jQuery and output on the page flow question

Rails newbie, thanks for help with this hopefully basic JSON type
question…

I have a model Books in my app, which belong_to users.

What’d I’d like to learn how to do, is use jQuery to get a JSON object
of the books that the user owns (current_user). And then use jQuery to
list the results out on a div (id=targetdiv).

Where I’m not certain, is this something Rails 3 does out of the box?
Because I see the respond .js, but I think JSON is what is needed by
jQuery, right?

Thanks for helping me learn this!

you can have it respond a partial and in the partial have the iteration.
I
only use json if i need to do something with the data with the data with
javascript but not the display some html list or table, for that i use
simple erb.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs