diff --git a/app/controllers/moderations_controller.rb b/app/controllers/moderations_controller.rb index ef5c27b8..8b665921 100644 --- a/app/controllers/moderations_controller.rb +++ b/app/controllers/moderations_controller.rb @@ -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 diff --git a/test/controllers/orgas_controller_test.rb b/test/controllers/orgas_controller_test.rb index 8b25f1dc..10fb154d 100644 --- a/test/controllers/orgas_controller_test.rb +++ b/test/controllers/orgas_controller_test.rb @@ -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, diff --git a/test/mailers/orga_mailer_test.rb b/test/mailers/orga_mailer_test.rb index befa5f67..b4af4d28 100644 --- a/test/mailers/orga_mailer_test.rb +++ b/test/mailers/orga_mailer_test.rb @@ -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