Method: ActiveRecord::Relation#update
- Defined in:
- activerecord/lib/active_record/relation.rb
#update(id = :all, attributes) ⇒ Object
:nodoc:
621 622 623 624 625 626 627 |
# File 'activerecord/lib/active_record/relation.rb', line 621 def update(id = :all, attributes) # :nodoc: if id == :all each { |record| record.update(attributes) } else model.update(id, attributes) end end |