Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Replace deprecated `update_attribute` with `update`

Oliver Günther693bd7760a5c
diff --git a/app/controllers/auth_sources_controller.rb b/app/controllers/auth_sources_controller.rb
index 9a5fc8e203c..492f5f0c170 100644
--- a/app/controllers/auth_sources_controller.rb
+++ b/app/controllers/auth_sources_controller.rb
@@ -66,7 +66,7 @@ class AuthSourcesController < ApplicationController
updated = permitted_params.auth_source
updated.delete :account_password if updated[:account_password].blank?
- if @auth_source.update_attributes updated
+ if @auth_source.update updated
flash[:notice] = l(:notice_successful_update)
redirect_to action: 'index'
else
diff --git a/app/controllers/colors_controller.rb b/app/controllers/colors_controller.rb
index 7ed62a5a769..a5f229f91fd 100644
--- a/app/controllers/colors_controller.rb
+++ b/app/controllers/colors_controller.rb
@@ -76,7 +76,7 @@ class ColorsController < ApplicationController
def update
@color = Color.find(params[:id])
- if @color.update_attributes(permitted_params.color)
+ if @color.update(permitted_params.color)
flash[:notice] = l(:notice_successful_update)
redirect_to colors_path
else
diff --git a/app/controllers/concerns/omniauth_login.rb b/app/controllers/concerns/omniauth_login.rb
index 147037a0cb4..3efdd459380 100644
--- a/app/controllers/concerns/omniauth_login.rb
+++ b/app/controllers/concerns/omniauth_login.rb
@@ -167,7 +167,7 @@ module Concerns::OmniauthLogin
return if handle_omniauth_registration_expired(auth)
fill_user_fields_from_omniauth(user, auth)
- user.update_attributes(permitted_params.user_register_via_omniauth)
+ user.update(permitted_params.user_register_via_omniauth)
opts = {
omni_auth_hash: auth
diff --git a/app/controllers/custom_styles_controller.rb b/app/controllers/custom_styles_controller.rb
index 57561ec5d79..c6d8d1ebc6d 100644
--- a/app/controllers/custom_styles_controller.rb
+++ b/app/controllers/custom_styles_controller.rb
@@ -53,7 +53,7 @@ class CustomStylesController < ApplicationController
def update
@custom_style = CustomStyle.current
- if @custom_style.update_attributes(custom_style_params)
+ if @custom_style.update(custom_style_params)
redirect_to custom_style_path
else
flash[:error] = @custom_style.errors.full_messages
diff --git a/app/controllers/enumerations_controller.rb b/app/controllers/enumerations_controller.rb
index ddfe82af9a2..8b06408db9c 100644
--- a/app/controllers/enumerations_controller.rb
+++ b/app/controllers/enumerations_controller.rb
@@ -67,7 +67,7 @@ class EnumerationsController < ApplicationController
enum_params = permitted_params.enumerations
type = permitted_params.enumeration_type
@enumeration.type = enumeration_class(type).try(:name) || @enumeration.type
- if @enumeration.update_attributes enum_params
+ if @enumeration.update enum_params
flash[:notice] = l(:notice_successful_update)
redirect_to enumerations_path(type: @enumeration.type)
else
diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb
index 9a87d66a44d..65a2ccb0884 100644
--- a/app/controllers/forums_controller.rb
+++ b/app/controllers/forums_controller.rb
@@ -106,7 +106,7 @@ class ForumsController < ApplicationController
def edit; end
def update
- if @forum.update_attributes(permitted_params.forum)
+ if @forum.update(permitted_params.forum)
flash[:notice] = l(:notice_successful_update)
redirect_to_settings_in_projects
else
@@ -115,7 +115,7 @@ class ForumsController < ApplicationController
end
def move
- if @forum.update_attributes(permitted_params.forum_move)
+ if @forum.update(permitted_params.forum_move)
flash[:notice] = t(:notice_successful_update)
else
flash.now[:error] = t('forum_could_not_be_saved')
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index ebeb155cc26..b58244dd85f 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -97,7 +97,7 @@ class GroupsController < ApplicationController
@group = Group.includes(:users).find(params[:id])
respond_to do |format|
- if @group.update_attributes(permitted_params.group)
+ if @group.update(permitted_params.group)
flash[:notice] = l(:notice_successful_update)
format.html do redirect_to(groups_path) end
format.xml do head :ok end
diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb
index c7b5ec08ce3..c8dc6cef95a 100644
--- a/app/controllers/statuses_controller.rb
+++ b/app/controllers/statuses_controller.rb
@@ -66,7 +66,7 @@ class StatusesController < ApplicationController
verify method: :patch, only: :update, render: { nothing: true, status: :method_not_allowed }
def update
@status = Status.find(params[:id])
- if @status.update_attributes(permitted_params.status)
+ if @status.update(permitted_params.status)
flash[:notice] = l(:notice_successful_update)
redirect_to action: 'index'
else
diff --git a/app/controllers/types_controller.rb b/app/controllers/types_controller.rb
index 0d5f04fd831..9be9b77de6d 100644
--- a/app/controllers/types_controller.rb
+++ b/app/controllers/types_controller.rb
@@ -101,7 +101,7 @@ class TypesController < ApplicationController
def move
@type = ::Type.find(params[:id])
- if @type.update_attributes(permitted_params.type_move)
+ if @type.update(permitted_params.type_move)
flash[:notice] = l(:notice_successful_update)
else
flash.now[:error] = t('type_could_not_be_saved')
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index 958f2699735..a1396ec9eef 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -224,7 +224,7 @@ class WikiController < ApplicationController
existing_identifier: item.name)
redirect_to_show
- elsif @page.update_attributes(attributes)
+ elsif @page.update(attributes)
flash[:notice] = t(:notice_successful_update)
redirect_to_show
end
diff --git a/app/models/journal.rb b/app/models/journal.rb
index af571bb02c9..b1ece40c7b4 100644
--- a/app/models/journal.rb
+++ b/app/models/journal.rb
@@ -60,7 +60,7 @@ class Journal < ActiveRecord::Base
if attributes.is_a? Hash and attributes.values.first.is_a? Array
attributes.each { |k, v| attributes[k] = v[1] }
end
- data.update_attributes attributes
+ data.update attributes
end
# In conjunction with the included Comparable module, allows comparison of journal records
diff --git a/app/models/project.rb b/app/models/project.rb
index 30a9f6be250..54a16a527de 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -277,7 +277,7 @@ class Project < ActiveRecord::Base
create_time_entry_activity_if_needed(activity_hash)
else
activity = project.time_entry_activities.find_by(id: id.to_i)
- activity.update_attributes(activity_hash) if activity
+ activity.update(activity_hash) if activity
end
end
diff --git a/app/seeders/basic_data/role_seeder.rb b/app/seeders/basic_data/role_seeder.rb
index 3035388057d..6122a80fbdf 100644
--- a/app/seeders/basic_data/role_seeder.rb
+++ b/app/seeders/basic_data/role_seeder.rb
@@ -35,7 +35,7 @@ module BasicData
end
builtin_roles.each do |attributes|
- Role.find_by!(name: attributes[:name]).update_attributes(attributes)
+ Role.find_by!(name: attributes[:name]).update(attributes)
end
end
end
diff --git a/app/workers/scm/storage_updater_job.rb b/app/workers/scm/storage_updater_job.rb
index 0f82999461b..6550b9c0eee 100644
--- a/app/workers/scm/storage_updater_job.rb
+++ b/app/workers/scm/storage_updater_job.rb
@@ -42,7 +42,7 @@ class Scm::StorageUpdaterJob < ApplicationJob
repository = Repository.find @id
bytes = repository.scm.count_repository!
- repository.update_attributes!(
+ repository.update!(
required_storage_bytes: bytes,
storage_updated_at: Time.now,
)
diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb
index 7f64d99cee8..958b6bdc8b0 100644
--- a/features/step_definitions/common_steps.rb
+++ b/features/step_definitions/common_steps.rb
@@ -48,7 +48,7 @@ Given /^the [pP]roject(?: "([^\"]+?)")? uses the following types:$/ do |project,
type
}
- project.update_attributes type_ids: types.map(&:id).map(&:to_s)
+ project.update type_ids: types.map(&:id).map(&:to_s)
end
Then(/^I should see the following fields:$/) do |table|
diff --git a/modules/auth_saml/lib/open_project/auth_saml/engine.rb b/modules/auth_saml/lib/open_project/auth_saml/engine.rb
index 4c8d2396cb0..7936f0b5df2 100644
--- a/modules/auth_saml/lib/open_project/auth_saml/engine.rb
+++ b/modules/auth_saml/lib/open_project/auth_saml/engine.rb
@@ -26,7 +26,7 @@ module OpenProject
# Don't allow unsetting admin if user is already admin
attributes.delete(:admin) if user.admin?
- user.update_attributes attributes
+ user.update attributes
end
end
diff --git a/modules/backlogs/app/controllers/rb_sprints_controller.rb b/modules/backlogs/app/controllers/rb_sprints_controller.rb
index 56ee9a00e53..4527d6f21d0 100644
--- a/modules/backlogs/app/controllers/rb_sprints_controller.rb
+++ b/modules/backlogs/app/controllers/rb_sprints_controller.rb
@@ -39,7 +39,7 @@
# RbTaskboardsController
class RbSprintsController < RbApplicationController
def update
- result = @sprint.update_attributes(params.permit(:name,
+ result = @sprint.update(params.permit(:name,
:start_date,
:effective_date))
status = (result ? 200 : 400)
diff --git a/modules/bcf/lib/open_project/bcf/bcf_xml/issue_reader.rb b/modules/bcf/lib/open_project/bcf/bcf_xml/issue_reader.rb
index 4f54774c387..14584f26e9c 100644
--- a/modules/bcf/lib/open_project/bcf/bcf_xml/issue_reader.rb
+++ b/modules/bcf/lib/open_project/bcf/bcf_xml/issue_reader.rb
@@ -399,7 +399,7 @@ module OpenProject::Bcf::BcfXml
end
def update_journal_attributes(bcf_comment, comment_data)
- bcf_comment.journal.update_attributes(notes: comment_data[:comment],
+ bcf_comment.journal.update(notes: comment_data[:comment],
created_at: comment_data[:modified_date])
bcf_comment.journal.save
end
diff --git a/modules/documents/spec/controllers/documents_controller_spec.rb b/modules/documents/spec/controllers/documents_controller_spec.rb
index 312641e05a4..48bd30ed8a3 100644
--- a/modules/documents/spec/controllers/documents_controller_spec.rb
+++ b/modules/documents/spec/controllers/documents_controller_spec.rb
@@ -71,7 +71,7 @@ describe DocumentsController do
}
before do
- document.update_attributes(description: long_description)
+ document.update(description: long_description)
get :index, params: { project_id: project.identifier }
end
diff --git a/modules/pdf_export/app/controllers/export_card_configurations_controller.rb b/modules/pdf_export/app/controllers/export_card_configurations_controller.rb
index fcba657303f..df40e962c4a 100644
--- a/modules/pdf_export/app/controllers/export_card_configurations_controller.rb
+++ b/modules/pdf_export/app/controllers/export_card_configurations_controller.rb
@@ -58,7 +58,7 @@ class ExportCardConfigurationsController < ApplicationController
if cannot_update_default
flash[:error] = l(:error_can_not_change_name_of_default_configuration)
render "edit"
- elsif @config.update_attributes(export_card_configurations_params)
+ elsif @config.update(export_card_configurations_params)
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'index'
else
diff --git a/modules/pdf_export/app/models/export_card_configuration.rb b/modules/pdf_export/app/models/export_card_configuration.rb
index 4e28177ad47..2f58a75448c 100644
--- a/modules/pdf_export/app/models/export_card_configuration.rb
+++ b/modules/pdf_export/app/models/export_card_configuration.rb
@@ -108,12 +108,12 @@ class ExportCardConfiguration < ActiveRecord::Base
end
def activate
- self.update_attributes!({active: true})
+ self.update!({active: true})
end
def deactivate
if !self.is_default?
- self.update_attributes!({active: false})
+ self.update!({active: false})
else
false
end
diff --git a/spec/controllers/custom_styles_controller_spec.rb b/spec/controllers/custom_styles_controller_spec.rb
index 9198ea80c67..e0b8040ad94 100644
--- a/spec/controllers/custom_styles_controller_spec.rb
+++ b/spec/controllers/custom_styles_controller_spec.rb
@@ -119,7 +119,7 @@ describe CustomStylesController, type: :controller do
with_enterprise_token(:define_custom_style)
expect(CustomStyle).to receive(:current).and_return(custom_style)
- expect(custom_style).to receive(:update_attributes).and_return(valid)
+ expect(custom_style).to receive(:update).and_return(valid)
post :update, params: params
end
diff --git a/spec/controllers/wiki_controller_spec.rb b/spec/controllers/wiki_controller_spec.rb
index 18633ad2060..01b9bf8e500 100644
--- a/spec/controllers/wiki_controller_spec.rb
+++ b/spec/controllers/wiki_controller_spec.rb
@@ -241,7 +241,7 @@ describe WikiController, type: :controller do
@anon = User.anonymous.nil? ? FactoryBot.create(:anonymous) : User.anonymous
- Role.anonymous.update_attributes name: I18n.t(:default_role_anonymous),
+ Role.anonymous.update name: I18n.t(:default_role_anonymous),
permissions: [:view_wiki_pages]
allow(User).to receive(:current).and_return @user
diff --git a/spec/features/projects/projects_index_spec.rb b/spec/features/projects/projects_index_spec.rb
index c42ddf1ec82..4ffa0203f9f 100644
--- a/spec/features/projects/projects_index_spec.rb
+++ b/spec/features/projects/projects_index_spec.rb
@@ -122,7 +122,7 @@ describe 'Projects index page',
feature 'for admins' do
before do
- project.update_attributes(created_on: 7.days.ago)
+ project.update(created_on: 7.days.ago)
news
end
@@ -632,7 +632,7 @@ describe 'Projects index page',
# Remove public projects from the default list for these scenarios.
public_project.update_attribute :status, Project::STATUS_ARCHIVED
- project.update_attributes(created_on: 7.days.ago)
+ project.update(created_on: 7.days.ago)
news
end
diff --git a/spec/features/users/index_spec.rb b/spec/features/users/index_spec.rb
index 71d6e77179b..78294d41857 100644
--- a/spec/features/users/index_spec.rb
+++ b/spec/features/users/index_spec.rb
@@ -79,7 +79,7 @@ describe 'index users', type: :feature do
index_page.expect_listed(active_user)
# temporarily block user
- active_user.update_attributes(failed_login_count: 6,
+ active_user.update(failed_login_count: 6,
last_failed_login_on: 9.minutes.ago)
index_page.clear_filters
index_page.expect_listed(admin, active_user, registered_user, invited_user)
@@ -92,7 +92,7 @@ describe 'index users', type: :feature do
# temporarily block user and lock permanently
active_user.reload
- active_user.update_attributes(failed_login_count: 6,
+ active_user.update(failed_login_count: 6,
last_failed_login_on: 9.minutes.ago)
index_page.clear_filters
diff --git a/spec/features/work_packages/edit_work_package_spec.rb b/spec/features/work_packages/edit_work_package_spec.rb
index cf931c04b04..de014b601ef 100644
--- a/spec/features/work_packages/edit_work_package_spec.rb
+++ b/spec/features/work_packages/edit_work_package_spec.rb
@@ -50,7 +50,7 @@ describe 'edit work package', js: true do
created_at: 5.days.ago.to_date.to_s(:db))
note_journal = work_package.journals.last
- note_journal.update_attributes(created_at: 5.days.ago.to_date.to_s)
+ note_journal.update(created_at: 5.days.ago.to_date.to_s)
work_package
end
diff --git a/spec/features/work_packages/tabs/activity_revisions_spec.rb b/spec/features/work_packages/tabs/activity_revisions_spec.rb
index cd942f29eb1..26be4577b56 100644
--- a/spec/features/work_packages/tabs/activity_revisions_spec.rb
+++ b/spec/features/work_packages/tabs/activity_revisions_spec.rb
@@ -5,10 +5,10 @@ require 'support/work_packages/work_package_field'
describe 'Activity tab', js: true, selenium: true do
def alter_work_package_at(work_package, attributes:, at:, user: User.current)
- work_package.update_attributes(attributes.merge(updated_at: at))
+ work_package.update(attributes.merge(updated_at: at))
note_journal = work_package.journals.last
- note_journal.update_attributes(created_at: at, user: attributes[:user])
+ note_journal.update(created_at: at, user: attributes[:user])
end
let(:project) { FactoryBot.create :project_with_types, is_public: true }
@@ -20,7 +20,7 @@ describe 'Activity tab', js: true, selenium: true do
journal_notes: initial_comment)
note_journal = work_package.journals.last
- note_journal.update_attributes(created_at: 5.days.ago.to_date.to_s)
+ note_journal.update(created_at: 5.days.ago.to_date.to_s)
work_package
end
diff --git a/spec/features/work_packages/tabs/activity_tab_spec.rb b/spec/features/work_packages/tabs/activity_tab_spec.rb
index dfa2648611d..96d66c88f70 100644
--- a/spec/features/work_packages/tabs/activity_tab_spec.rb
+++ b/spec/features/work_packages/tabs/activity_tab_spec.rb
@@ -5,10 +5,10 @@ require 'support/work_packages/work_package_field'
describe 'Activity tab', js: true, selenium: true do
def alter_work_package_at(work_package, attributes:, at:, user: User.current)
- work_package.update_attributes(attributes.merge(updated_at: at))
+ work_package.update(attributes.merge(updated_at: at))
note_journal = work_package.journals.last
- note_journal.update_attributes(created_at: at, user: attributes[:user])
+ note_journal.update(created_at: at, user: attributes[:user])
end
let(:project) { FactoryBot.create :project_with_types, is_public: true }
@@ -20,7 +20,7 @@ describe 'Activity tab', js: true, selenium: true do
journal_notes: initial_comment)
note_journal = work_package.journals.last
- note_journal.update_attributes(created_at: 5.days.ago.to_date.to_s)
+ note_journal.update(created_at: 5.days.ago.to_date.to_s)
work_package
end
diff --git a/spec/features/work_packages/work_package_workflow_form_spec.rb b/spec/features/work_packages/work_package_workflow_form_spec.rb
index 25c8ec73b1b..54b86a2f9c5 100644
--- a/spec/features/work_packages/work_package_workflow_form_spec.rb
+++ b/spec/features/work_packages/work_package_workflow_form_spec.rb
@@ -55,7 +55,7 @@ describe 'Work package transitive status workflows', js: true do
created_at: 5.days.ago.to_date.to_s(:db)
note_journal = work_package.journals.last
- note_journal.update_attributes(created_at: 5.days.ago.to_date.to_s)
+ note_journal.update(created_at: 5.days.ago.to_date.to_s)
work_package
}
diff --git a/spec/models/project/storage_spec.rb b/spec/models/project/storage_spec.rb
index 75564d1a0e8..b7fe390cc4c 100644
--- a/spec/models/project/storage_spec.rb
+++ b/spec/models/project/storage_spec.rb
@@ -47,7 +47,7 @@ describe Project::Storage, type: :model do
FactoryBot.create(:attachment, filesize: 10000, container: wikipage)
repo = FactoryBot.create(:repository_git, project: project2)
- repo.update_attributes(required_storage_bytes: 1234)
+ repo.update(required_storage_bytes: 1234)
end
describe '#with_required_storage' do
@@ -80,7 +80,7 @@ describe Project::Storage, type: :model do
context 'with a project with all modules' do
let(:repository1) { FactoryBot.create(:repository_git, project: project1) }
before do
- repository1.update_attributes(required_storage_bytes: 543211234)
+ repository1.update(required_storage_bytes: 543211234)
end
it 'counts all projects correctly' do
diff --git a/spec/models/work_package/openproject_notifications_spec.rb b/spec/models/work_package/openproject_notifications_spec.rb
index b8924739cd1..2580e730412 100644
--- a/spec/models/work_package/openproject_notifications_spec.rb
+++ b/spec/models/work_package/openproject_notifications_spec.rb
@@ -67,7 +67,7 @@ describe WorkPackage, type: :model do
journal_ids.clear
- work_package.update_attributes subject: 'the wind of change'
+ work_package.update subject: 'the wind of change'
end
it "are triggered" do
diff --git a/spec/models/work_package/work_package_acts_as_watchable_spec.rb b/spec/models/work_package/work_package_acts_as_watchable_spec.rb
index 3c44e26c50b..28e2c7789c9 100644
--- a/spec/models/work_package/work_package_acts_as_watchable_spec.rb
+++ b/spec/models/work_package/work_package_acts_as_watchable_spec.rb
@@ -60,7 +60,7 @@ describe WorkPackage, type: :model do
end
it 'sends one delayed mail notification for each watcher recipient' do
- work_package.update_attributes description: 'Any new description'
+ work_package.update description: 'Any new description'
end
end
end
diff --git a/spec/models/work_package/work_package_notifications_spec.rb b/spec/models/work_package/work_package_notifications_spec.rb
index 79751ed5812..bf652f7075a 100644
--- a/spec/models/work_package/work_package_notifications_spec.rb
+++ b/spec/models/work_package/work_package_notifications_spec.rb
@@ -72,7 +72,7 @@ describe WorkPackage, type: :model do
describe 'after update' do
before do
- work_package.update_attributes subject: 'the wind of change'
+ work_package.update subject: 'the wind of change'
end
it "are sent to the work package's author" do
diff --git a/spec/support/scm/relocate_repository.rb b/spec/support/scm/relocate_repository.rb
index 66e80cbf30f..8585da62d38 100644
--- a/spec/support/scm/relocate_repository.rb
+++ b/spec/support/scm/relocate_repository.rb
@@ -27,7 +27,7 @@ shared_examples_for 'repository can be relocated' do |vendor|
expect(Dir.exists?(repository.managed_repository_path)).to be true
# Rename the project
- project.update_attributes!(identifier: 'somenewidentifier')
+ project.update!(identifier: 'somenewidentifier')
repository.reload
job.perform
diff --git a/spec/support/shared/acts_as_watchable.rb b/spec/support/shared/acts_as_watchable.rb
index 15206bbc610..f9630357221 100644
--- a/spec/support/shared/acts_as_watchable.rb
+++ b/spec/support/shared/acts_as_watchable.rb
@@ -132,7 +132,7 @@ MESSAGE
context 'when it is a public project' do
before do
- project.update_attributes is_public: true
+ project.update is_public: true
model_instance.reload
end
@@ -150,7 +150,7 @@ MESSAGE
context 'when it is a private project' do
before do
- project.update_attributes is_public: false
+ project.update is_public: false
model_instance.reload
end
@@ -241,7 +241,7 @@ MESSAGE
context 'when it is a public project' do
before do
- project.update_attributes is_public: true
+ project.update is_public: true
model_instance.reload
end
@@ -275,7 +275,7 @@ MESSAGE
context 'when it is a private project' do
before do
- project.update_attributes is_public: false
+ project.update is_public: false
model_instance.reload
end
diff --git a/spec_legacy/unit/enumeration_spec.rb b/spec_legacy/unit/enumeration_spec.rb
index f3debb03ce2..2f56e3e0f1b 100644
--- a/spec_legacy/unit/enumeration_spec.rb
+++ b/spec_legacy/unit/enumeration_spec.rb
@@ -63,18 +63,18 @@ describe Enumeration, type: :model do
end
it 'should update default' do
- @default_enumeration.update_attributes(name: 'Changed', is_default: true)
+ @default_enumeration.update(name: 'Changed', is_default: true)
assert_equal @default_enumeration, Enumeration.default
end
it 'should update default to non default' do
- @default_enumeration.update_attributes(name: 'Changed', is_default: false)
+ @default_enumeration.update(name: 'Changed', is_default: false)
assert_nil Enumeration.default
end
it 'should change default' do
e = Enumeration.find_by(name: @default_enumeration.name)
- e.update_attributes(name: 'Changed Enumeration', is_default: true)
+ e.update(name: 'Changed Enumeration', is_default: true)
assert_equal e, Enumeration.default
end