Rspec forum isn't working
Rspec is having trouble recognizing where method.
Here's the rspec output:
NoMethodError:
undefined method `where' for #<Article:0x000000066ceb38>
#
/apps/rvm/gems/ruby-2.0.0-p481/gems/activemodel-4.0.10/lib/active_model/attribute_methods.rb:439:in
`method_missing'
#
/apps/rvm/gems/ruby-2.0.0-p481/gems/activerecord-4.0.10/lib/active_record/attribute_methods.rb:168:in
`method_missing'
#
/apps/rvm/gems/ruby-2.0.0-p481/gems/activerecord-4.0.10/lib/active_record/querying.rb:9:in
`where'
The spec calls index which then calls a public method that uses the
following method:
class X < ActiveRecord::Base
def self.low_level
where(:level=> 1)
end
end
Any ideas what could be the problem?
--
Posted via
http://www.ruby-forum.com/.