summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernlöhr <Heiko.Bernloehr@FreeIT.de>2021-12-20 02:45:30 +0100
committerHeiko Bernlöhr <Heiko.Bernloehr@FreeIT.de>2022-09-15 10:01:46 +0200
commit73bd4cbe0ff19247c9f041a6a482e38ae2cefc9c (patch)
treea74cef44f59dc7286615830dfa7fa20acbf9b7ff
parent8a89d8352362add321ed4fdc7f604dd54e2c3251 (diff)
downloadecs-73bd4cbe0ff19247c9f041a6a482e38ae2cefc9c.tar.gz
ecs-73bd4cbe0ff19247c9f041a6a482e38ae2cefc9c.zip
Fix deprecated update_attributes method.v2.0.0
-rw-r--r--app/controllers/admin/communities_controller.rb2
-rw-r--r--app/controllers/admin/organizations_controller.rb2
-rw-r--r--app/controllers/admin/participants_controller.rb2
-rw-r--r--app/controllers/admin/ressources_controller.rb2
-rw-r--r--app/models/subparticipant.rb2
5 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/admin/communities_controller.rb b/app/controllers/admin/communities_controller.rb
index e44ab6a..8012eec 100644
--- a/app/controllers/admin/communities_controller.rb
+++ b/app/controllers/admin/communities_controller.rb
@@ -55,7 +55,7 @@ class Admin::CommunitiesController < ApplicationController
def update
@community = Community.find(params[:id])
- if @community.update_attributes(community_params)
+ if @community.update(community_params)
flash[:notice] = 'Community was successfully updated.'
redirect_to admin_community_path(@community)
else
diff --git a/app/controllers/admin/organizations_controller.rb b/app/controllers/admin/organizations_controller.rb
index 95c1e00..65e8166 100644
--- a/app/controllers/admin/organizations_controller.rb
+++ b/app/controllers/admin/organizations_controller.rb
@@ -55,7 +55,7 @@ class Admin::OrganizationsController < ApplicationController
def update
@organization = Organization.find(params[:id])
- if @organization.update_attributes(organization_params)
+ if @organization.update(organization_params)
flash[:notice] = 'Organization was successfully updated.'
redirect_to :action => 'index'
else
diff --git a/app/controllers/admin/participants_controller.rb b/app/controllers/admin/participants_controller.rb
index f206913..cb04e9b 100644
--- a/app/controllers/admin/participants_controller.rb
+++ b/app/controllers/admin/participants_controller.rb
@@ -100,7 +100,7 @@ class Admin::ParticipantsController < ApplicationController
@organizations = Organization.all.order(:id)
@participant = Participant.find(params[:id])
lmsgs= leaved_messages(@participant, params[:participant][:community_ids])
- if @participant.update_attributes(participant_params)
+ if @participant.update(participant_params)
generate_destroyed_events_by_leaving_a_community(@participant,lmsgs) unless lmsgs.blank?
flash[:notice] = 'Participant was successfully updated.'
redirect_to admin_participant_path(:id => @participant)
diff --git a/app/controllers/admin/ressources_controller.rb b/app/controllers/admin/ressources_controller.rb
index 293681b..76cb786 100644
--- a/app/controllers/admin/ressources_controller.rb
+++ b/app/controllers/admin/ressources_controller.rb
@@ -58,7 +58,7 @@ class Admin::RessourcesController < ApplicationController
def update
#params[:participant][:community_ids] ||= []
@ressource = Ressource.find(params[:id])
- if @ressource.update_attributes(ressource_params)
+ if @ressource.update(ressource_params)
flash[:notice] = 'Ressource was successfully updated.'
redirect_to admin_ressource_path(:id => @ressource)
else
diff --git a/app/models/subparticipant.rb b/app/models/subparticipant.rb
index 825b5e1..1870239 100644
--- a/app/models/subparticipant.rb
+++ b/app/models/subparticipant.rb
@@ -70,7 +70,7 @@ class Subparticipant < ApplicationRecord
"events_" => data[:events],
"subparticipant_attributes" => { :id => self.id.to_s, :realm => data[:realm] }
}
- participant.update_attributes(params)
+ participant.update(params)
end
private