You do not have access to this ticket

This project is archived and is in readonly mode.

#5979 ✓resolved
Tohru Hashimoto

ActiveRecord::Relation#find with class

Reported by Tohru Hashimoto | November 16th, 2010 @ 01:35 AM

behavior changed?

class Author < ActiveRecord::Base
end 
class Mary
end 
Author.create!(:name => 'Mary')

In 3.0.1:

Author.where(:name => Mary).size # => 1

In 3.0.2:

Author.where(:name => Mary).size # NoMethodError: undefined method `visit_Mary'

Comments and changes to this ticket

Create your profile

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

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages