SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Threaded View
-
Aug 9, 2008, 14:48 #1
- Join Date
- Aug 2008
- Location
- Georgia, USA
- Posts
- 3
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
uninitialized constant StoriesController
Hello Guys:
I am really new in RoR, two weeks old. I am studying on my own using the Simply Rails 2 book by Patrick. I am in Chapter 6, and following the instructions, this is my StoriesController file:
class StoriesController < ApplicationController
def index
@story = Story.find( :first, : order => 'RANDOM()')
#Comment: I left a space between ( and : and : and order since otherwise a figuring would show.
end
#Connecting the new.html.erb file:
def new
@story = Story.new
end
def create
@story = Story.new(params[:story])
@story.save
#this is a url helper
redirect_to stories_path
end
end
NameError in StoriesController#new
uninitialized constant StoriesController
RAILS_ROOT: C:/InstantRails-2.0-win/rails_apps/shovellrails shovell
Please help me anyone.
Thanks.
--Willie
Bookmarks