[rspec-users] Q: object.id is deprecated. How to mock?
mark at mwilden.com
Tue Nov 25 15:31:20 EST 2008
On Tue, Nov 25, 2008 at 11:04 AM, s.ross <cwdinfo at gmail.com> wrote:
> In Rails, the primary key, by default 'id', is used all over the
> place. However, Ruby now deprecates the use of constructs like:
> @post = Post.find(:first)
> @post_id = @post.id
These are different methods. Object#id is indeed deprecated, but
ActiveRecord::Base#id is perfectly fine.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users