--
Kurtis Rainbolt-Greene:
- Hacker, Designer, Author
- 3725 Onyx Street, Eugene, OR 97405
- (202) 643-2263
thankyou Kurtis Rainbolt-Greene. ya i tried it but even it is giving me
an error.
error:
undefined method `condition' for Bird(id: integer, state: string, city:
string):Class
Thankyou
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
works.
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.