| Article: |
Rolling with Ruby on Rails | |
| Subject: | undefined method 'title' | |
| Date: | 2006-10-04 14:44:46 | |
| From: | ozymandias | |
|
After i added the 'list' method in 'recipe_controller.rb' and created the 'list.rhtml' file, i got the following error message when trying to connect to '/recipe/list':
|
||
Showing messages 1 through 6 of 6.
-
undefined method 'title'
2007-02-05 05:52:36 fcamel [View]
-
undefined method 'title'
2006-10-08 01:05:49 benjaminzsj [View]
I got a similar problem, too.
undefined method `title' for #<Array:0xb75abe2c>
It's with my Ubuntu 6.10. Is there something wrong with my db setup? -
undefined method 'title'
2006-10-08 01:09:14 benjaminzsj [View]
Sorry, forgot to mention it occurred when I modify the edit.rhtml and I copied code from the article. -
undefined method 'title'
2006-10-09 08:09:44 Curt Hibbs |
[View]
This method is generated dynamically based on the column names in your receipes tables. Check the spelling in you database and make sure it matches the spelling in you list.rhtml file. -
undefined method 'title'
2006-10-09 08:14:53 Curt Hibbs |
[View]
It would be nice if I knew how to spell, too! :-)
That should have read "in your recipes table."
-
undefined method 'title'
2006-10-04 18:21:38 Curt Hibbs |
[View]
I think you've got a mistake in your list.rhtml file. Double-check it.



of the method "edit", I type
@recipe = Recipe.find_all(@params["id"])
^^^^^^^^
rewrite this as "find(@params["id"])", it works.