SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot Xavius's Avatar
    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

  2. #2
    SitePoint Wizard chris_fuel's Avatar
    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.

  3. #3
    SitePoint Zealot Xavius's Avatar
    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.

  4. #4
    SitePoint Zealot Xavius's Avatar
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •