replace deprecated update_attributes with update
This commit is contained in:
parent
eb45a2bf21
commit
3ffdb424d5
28 changed files with 52 additions and 53 deletions
|
|
@ -25,7 +25,7 @@ class Admin::LinksController < Admin::BaseController
|
|||
def update
|
||||
@link = Link.find(params[:id])
|
||||
|
||||
if @link.update_attributes!(link_params)
|
||||
if @link.update!(link_params)
|
||||
index
|
||||
render action: :update_links
|
||||
else
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class PollsController < ApplicationController
|
|||
|
||||
if user_has_no_right
|
||||
redirect_to polls_path, alert: t('.no_right')
|
||||
elsif @poll.update_attributes(poll_params)
|
||||
elsif @poll.update(poll_params)
|
||||
redirect_to @poll, notice: t('.notice')
|
||||
else
|
||||
render action: 'edit'
|
||||
|
|
|
|||
|
|
@ -26,6 +26,6 @@ class PrinterJob < ActiveRecord::Base
|
|||
def finish!(user = nil)
|
||||
return unless finished_at.nil?
|
||||
|
||||
update_attributes finished_at: Time.now, finished_by: user
|
||||
update(finished_at: Time.now, finished_by: user)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue