#1156 ✓resolved
Greg Campbell

Calling deprecated Resource#update_attributes raises an error rather than outputting a deprecation warning

Reported by Greg Campbell | December 16th, 2009 @ 12:17 PM | in 1.0.0

It appears that the error is coming from the deprecation routine for update_attributes. See below.

require 'rubygems'
require 'dm-core'

DataMapper.setup(:default, 'sqlite3::memory:')

class Car
  include DataMapper::Resource

  property :id, Serial
  property :make, String
  property :model, String


car = Car.create(:make => "Toyota", :model => "Prius")
# The next line should output a deprecation warning, but instead raises a NoMethodError
car.update_attributes(:make => "Honda", :model => "Accord")

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Referenced by