The 2 most direct causes I can think of that would produce that error
would be:

1. create.js.rjs is not in the correct director (.../app/views/
comments/create.js.rjs
2. create.js.rjs does not exist or bad file name


Try using:
 def create
    @story = Story.find(params[:story_id])
    @story.comments.create params[:comment]
    request.format = :js
    respond_to do |format|
      format.js
  end
end

Although respond _to blocks are not always necessary, it can't hurt to
try.

On Aug 3, 11:58 am, Neil Bye <[email protected]> wrote:
> Joshua Mckinney wrote:
> > Have you tried naming the file create.js.rjs?
>
> Good idea but no difference.
>
> The latest configuration of the create function is:
>
>  def create
>     @story = Story.find(params[:story_id])
>     @story.comments.create params[:comment]
>     request.format = :js
>  end
>
> Gives a page with the addresshttp://localhost:3000/stories/2/comments
> it should behttp://localhost:3000/stories/2/and it says this.
>
> Template is missing
>
> Missing template comments/create.erb in view path app/views
>
> Even if I make create.html.erb or as it asks create.erb it makes no
> difference. Does that shed any light on the problem?
>
> In peace Neil
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to