test/dummy/app/controllers/accounts_controller.rb in trust-0.8.3 vs test/dummy/app/controllers/accounts_controller.rb in trust-1.4.2
- old
+ new
@@ -75,11 +75,11 @@
# PUT /clients/1/accounts/1
# PUT /clients/1/accounts/1.json
def update
respond_to do |format|
- if @account.update_attributes(params[:account])
- format.html { redirect_to client_account_path(@account), notice: 'Account was successfully updated.' }
+ if @account.update_attributes(resource.strong_params)
+ format.html { redirect_to client_account_path(@account.client, @account), notice: 'Account was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @account.errors, status: :unprocessable_entity }
end