app/controllers/reviews_controller.rb
#ajax handler to make a review
ajax handler to make a review
ajax handler to make a review
def draftsave
    review = Review.find(params["review_id"])
    review.draft = params["fieldtext"]
    review.save
    render json: {"foo"=>"bar"}
  end
def draftsave review = Review . find ( params [ "review_id" ] ) review . draft = params [ "fieldtext" ] review . save render json : { "foo" => "bar" } end
ajax handler to make a review
ajax handler to make a review