Skip to content

Commit

Permalink
Replace update_all with update_attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZitaNemeckova committed Apr 6, 2018
1 parent d3f5ab4 commit a934e65
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ class ExtManagementSystem < ActiveRecord::Base

def up
say_with_time("Removing provider_region from ManageIQ::Providers::Google::CloudManager") do
ExtManagementSystem.where(:type => 'ManageIQ::Providers::Google::CloudManager').update_all(:provider_region => nil)
ExtManagementSystem.where(:type => 'ManageIQ::Providers::Google::CloudManager').each do |provider|
provider.update_attributes!(:provider_region => nil)
end
end
end
end

0 comments on commit a934e65

Please sign in to comment.