Jeff Cohen wrote:
> On Dec 9, 1:47�pm, Jay Mark <[EMAIL PROTECTED]> wrote:
>> Jeff Cohen wrote:
>> Thanks for all your help Jeff.
>> It is still not working.
>> The find_by_name, gives me this error:
>> "undefined method `find_by_name' for ...."
>
> Can you post the full details of the error message from your log file?
>
> Also, if you open script/console, does Author.count and
> Author.find :first work as expected?
>
> Jeff
> purpleworkshops.com
Author.count in script/console works fine
Author.find :first gives error: "undefined local variable or method"
Here is the log file.
Processing AuthorsController#show (for 127.0.0.1 at 2008-12-09 15:31:25)
[GET]
Session ID:
BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7AA%3D%3D--11d9bb75a8effe12dc7f6fda1b51c9d2ea9943db
Parameters: {"commit"=>"Submit", "action"=>"show", "id"=>"show",
"controller"=>"authors", "author"=>{"name"=>"John"}}
[4;36;1mAuthor Columns (0.047000) [0m [0;1mSHOW FIELDS FROM
`authors` [0m
[4;35;1mSQL (0.015000) [0m [0mSHOW TABLES [0m
NoMethodError (undefined method `find_by_name' for #<Class:0x3da796c>):
Cypray
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---