Forum: Ruby on Rails Private method gsub Error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eric G. (Guest)
on 2006-03-22 11:29
(Received via mailing list)
Hi,
I keep getting this error when trying to use a condition in one of my
habtm.
I've used conditions in habtm before in other projects and they work
fine. Now I'm getting this:
private method `gsub' called for ["user_id = ?", "1"]:Array

This is what I'm doing.
has_and_belongs_to_many :TenSpeed, :class_name => "Bike", :conditions
=>["gears = ?","10"]

Any ideas why I would be getting the 'private' error?

Cheers,
Eric G.
This topic is locked and can not be replied to.