Reputation: 4050
I am quite new to rails. I have this code in my controller:
@schedules = Schedules.find(:all, :conditions => ["id = ?", params[:id]])
respond_to do |format|
format.html # list.html.erb
format.json { render :json => @schedules.to_json }
end
This works super, but how do I get the other way? How do I parse the received JSON to a Schedules object?
Thank you Søren
Upvotes: 1
Views: 620