Displaying 1 result from an estimated 1 matches for "push_or_update_with_attribut".
Did you mean:
push_or_update_with_attributes
2006 Jan 02
2
ActiveRecord:
In the Agile Rails book, on page 232 (PDF, 4th edition) there is an
example of (within ActiveRecord) marking an article as read by a user at
the present time. Short example code (from the book) here:
class User < ActiveRecord::Base
has_and_belongs_to_many :articles
def read_article(article)
articles.push_with_attributes(article, :read_at => Time.now)
end
# ...
end