I am new to ruby on rails.I am trying to search brokers,whose name contains "Jam" but its giving me error of "wrong number of arguments (2 for 1)". Following is my code:
@brokers = Broker.where("firstName = ?", "Jam")
Why am i getting wrong number of arguments error?
As you are using MongoMapper, you may need to use
all. You can try following query:OR
Source: http://mongomapper.com/documentation/plugins/querying.html
Update:
To use
likebehavior, you can use regexp such as: