I have successfully implemented the :remote => true in the _form.html.erb, and now I am trying to figure out how to display a notice after the user saves the information on the page.
Here is an excerpt from my documents_controller.rb:
def create
@document = current_user.documents.build(params[:document])
if @document.save
redirect_to @document.edit, notice: 'Saved'
else
render action: "new"
end
end
def update
@document = current_user.documents.find_by_url_id(params[:id])
if @document.update_attributes(params[:document])
redirect_to @document, notice: 'Saved'
else
render action: "edit"
end
end