Action Controller: Nil Object

I am getting this error message, although I have checked the
show.rhtml file and the corresponding controller file, when trying to
look at my new permalink. Any advice/help would be appreciated.

Um, @story is nil.

You’ll have to post the controller code for any help.


I've been back tracking all my work. Now I am getting a Routing Error
looking like this: Routing Error

no route found to match "/story/new/show/my-shiny-weblog" with

And my controller looks like this:

class StoryController < ApplicationController
  def index
    @story = Story.find(:first, :order => 'RAND()')

  def new
    @story =[:story])
    if and
      flash[:notice] = 'Story submission succeeded'
      redirect_to :action => 'index'

  def show
    @story = Story.find_by_permalink(params[:permalink])