From 88c81b44eae6d34753febe441810ddb20f6555fc Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 12 Oct 2023 14:20:00 +0000 Subject: Fix use of update_attributes --- app/controllers/admin/games_controller.rb | 2 +- app/controllers/admin/links_controller.rb | 2 +- app/controllers/admin/streams_controller.rb | 2 +- app/controllers/admin/updates_controller.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/controllers/admin') diff --git a/app/controllers/admin/games_controller.rb b/app/controllers/admin/games_controller.rb index ee5fe59..2da1e95 100644 --- a/app/controllers/admin/games_controller.rb +++ b/app/controllers/admin/games_controller.rb @@ -34,7 +34,7 @@ class Admin::GamesController < Admin::AdminController def update @game = Game.find(params[:id]) - if @game.update_attributes(game_params) + if @game.update(game_params) flash.notice = "Game updated successfully!" else flash.alert = "Error updating game." diff --git a/app/controllers/admin/links_controller.rb b/app/controllers/admin/links_controller.rb index bda0d49..54f245a 100644 --- a/app/controllers/admin/links_controller.rb +++ b/app/controllers/admin/links_controller.rb @@ -30,7 +30,7 @@ class Admin::LinksController < Admin::AdminController def update @link = Link.find(params[:id]) - if @link.update_attributes(link_params) + if @link.update(link_params) flash.notice = "Link updated successfully!" else flash.alert = "Error updating link." diff --git a/app/controllers/admin/streams_controller.rb b/app/controllers/admin/streams_controller.rb index 252ebfa..91ecc31 100644 --- a/app/controllers/admin/streams_controller.rb +++ b/app/controllers/admin/streams_controller.rb @@ -30,7 +30,7 @@ class Admin::StreamsController < Admin::AdminController def update @stream = Stream.find(params[:id]) - if @stream.update_attributes(stream_params) + if @stream.update(stream_params) flash.notice = "Stream updated successfully!" else flash.alert = "Error updating stream." diff --git a/app/controllers/admin/updates_controller.rb b/app/controllers/admin/updates_controller.rb index 9bf9caf..226daa5 100644 --- a/app/controllers/admin/updates_controller.rb +++ b/app/controllers/admin/updates_controller.rb @@ -30,7 +30,7 @@ class Admin::UpdatesController < Admin::AdminController @stream = Stream.find(params[:stream_id]) @update = Update.find(params[:id]) - if @update.update_attributes(update_params) + if @update.update(update_params) flash.notice = "Update updated successfully!" else flash.alert = "Error updating update." -- cgit 1.4.1