I need to supply data from my Ruby on Rails database to a jquery grid plugin. At the moment, I'm doing it like this:
@notes = current_user.notes.all
respond_to do |format|
format.xml { render :xml => @notes }
end
But I only want to display certain fields in the grid, so I need to change the code to only send specified fields from the model. What is the easiest way to do this? Thanks for reading.