calentry inline form

This commit is contained in:
Andreas Stephanides
2014-10-28 08:43:44 +01:00
parent 2622ed1513
commit 2688bca831
8 changed files with 41 additions and 2 deletions

View File

@@ -39,6 +39,7 @@ class CalentriesController < ApplicationController
@calentry = Calentry.find(params[:id])
respond_to do |format|
format.html
format.js
end
end
@@ -67,9 +68,11 @@ class CalentriesController < ApplicationController
if @calentry.update_attributes(params[:calentry])
format.html { redirect_to @calentry, notice: 'Calentry was successfully updated.' }
format.json { head :no_content }
format.js
else
format.html { render action: "edit" }
format.json { render json: @calentry.errors, status: :unprocessable_entity }
format.js { render action: "edit"}
end
end
end