Using update instead of update_attributes
This commit is contained in:
parent
034e313eb9
commit
cf3e6274eb
@ -24,7 +24,7 @@ class ModerationsController < ApplicationController
|
||||
# PATCH/PUT /moderations/1.json
|
||||
def update
|
||||
respond_to do |format|
|
||||
if @moderation.update_attributes moderation_params
|
||||
if @moderation.update moderation_params
|
||||
format.html { redirect_to :moderations, notice: t('.ok') }
|
||||
format.json { head :no_content }
|
||||
else
|
||||
|
@ -71,7 +71,7 @@ class OrgasControllerTest < ActionDispatch::IntegrationTest
|
||||
|
||||
test 'should update orga' do
|
||||
# Necessary to have the proper paper_trail version
|
||||
@orga.update_attributes name: 'My Title'
|
||||
@orga.update name: 'My Title'
|
||||
|
||||
patch orga_url(@orga), params: {
|
||||
secret: @orga.secret,
|
||||
|
@ -21,7 +21,7 @@ class OrgaMailerTest < ActionMailer::TestCase
|
||||
test 'update' do
|
||||
@orga = Orga.last
|
||||
# Necessary to have the proper paper_trail version
|
||||
@orga.update_attributes name: 'My Title'
|
||||
@orga.update name: 'My Title'
|
||||
mail = OrgaMailer.update @orga
|
||||
assert_match(/Organisation .* modifiée/, mail.subject)
|
||||
assert_equal [Orga.last.submitter], mail.to
|
||||
|
Loading…
Reference in New Issue
Block a user