SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: chapter 5 problem (page 140)
-
Feb 10, 2008, 10:48 #1
- Join Date
- Sep 2005
- Location
- Toronto, Canada
- Posts
- 195
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
chapter 5 problem (page 140)
undefined method `scaffold' for StoryController:Class
I'm not sure where I've made the mistake my code looks identical to that in the book:Code Ruby:class StoryController < ApplicationController scaffold :story end
-
Feb 10, 2008, 22:11 #2
- Join Date
- May 2006
- Location
- Ventura, CA
- Posts
- 2,750
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Scaffold defined like that was removed in rails 2.0, you can read about it here:
http://leonardoborges.com/writings/2...s-20-scaffold/
as well as the solution for it.
-
Feb 10, 2008, 22:22 #3
- Join Date
- Sep 2005
- Location
- Toronto, Canada
- Posts
- 195
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for the heads-up, I'll give it try.
-
Feb 11, 2008, 16:38 #4
- Join Date
- Sep 2005
- Location
- Toronto, Canada
- Posts
- 195
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
In case others run into this problem I solved it via chris_fuel's link. I started a new version of "Shovell". Then copy and pasted the database.yml file into the new rails app. After that I ran:
script/generate scaffold Story name:string link:string
and voila it worked!
Bookmarks