SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Oct 2005
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rails Scaffolding Question

    Hi,

    I have Rails 14.1 installed and I have been following the tutorials in the "Agile Development with Rails" book. For the first step in the shopping cart object they run the following command

    ruby script/generate scaffold Product Admin

    specificying that this will Make a Product model with a controller called Admin. The command seems to be working correctly but it creates the controller as "product" instead od "Admin." It is as if it just ignores the exra parameter on the command.

    So this means I can access the app from:

    railsapp.com/product/

    but not

    railsapp.com/admin/


    Does anyone have any idea what's going on?

    Thanks,

    Matt

  2. #2
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Yakima WA.
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Matt-
    This is a know issue with .14.x the scaffold generator. It doesn't do what the docs say it does. It is fixed in the trunk svn version. So if you check out the edge rails version the behavior is fixed and will be fixed when 1.0 final comes out.

    So for now your only choices are to use edge rails or go back to .13.1. I'm sure that
    .14.3 will fix the issue as well.

    Cheers-
    Ezra

  3. #3
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Yakima WA.
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually I found the patch that you can apply to your version of rails to fix this scafolding issue. Here you go!:

    http://dev.rubyonrails.com/ticket/2562

    Enjoy!
    Ezra

  4. #4
    SitePoint Member
    Join Date
    Oct 2005
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ezmobius1
    Actually I found the patch that you can apply to your version of rails to fix this scafolding issue. Here you go!:

    http://dev.rubyonrails.com/ticket/2562

    Enjoy!
    Ezra
    Thanks, this should work fine. I don't have subversion on my server so I was going to roll back to the old version. Now I don't have to!


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
  •