replace deprecated update_attributes with update
This commit is contained in:
parent
eb45a2bf21
commit
3ffdb424d5
28 changed files with 52 additions and 53 deletions
|
|
@ -47,8 +47,7 @@ class RoadToVersionThree < ActiveRecord::Migration[4.2]
|
|||
Ordergroup.all.each do |ordergroup|
|
||||
contact = ordergroup.users.first
|
||||
if contact
|
||||
ordergroup.update_attributes :contact_person => contact.name,
|
||||
:contact_phone => contact.phone, :contact_address => contact.address
|
||||
ordergroup.update(contact_person: contact.name, contact_phone: contact.phone, contact_address: contact.address)
|
||||
end
|
||||
end
|
||||
remove_column :users, :address
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue