please can anyone help me with this code....when i am executing the
following code, i am getting the error.
@animals=Bird.find(:all,:conditions =>['state like?', '%' +
@email@example.com(:all,:conditions =>['city like?', '%bad%'])
wrong number of arguments (2 for 0..1)
Is it as simple as the fact that you have not got a space before the
?, so that rails does not recognise it as a value to be filled in?
Otherwise which line is generating the error?
Note that if you use the rails console you can type statements
directly into the console to see whether they work which can help to
diagnose which bit of a statement is giving problems. params will not
be available of course but you can try it with fixed text to check it
However you do it a useful approach is to simplify the failing
statement right down to something that works, then build it up to what
you really want and then you will find the detail that is causing the
problem. As I said you can do most of this in the rails console.