Neil Bye wrote:
>
>>
>> Is there anything unusual in the view that triggers this?
>>
>> Fred
>
> This is the problem line from the view:
> <% remote_form_for :comment, :url=>story_comments_path(@story), :html
> => { :id => 'comment' } do |form| %>
> <div id="body"><%= form.text_field :body %></div>
> <p><%= submit_tag 'Comment' %></p>
>
However if I leave the remote_ in and change the create function to
def create
@story = Story.find(params[:story_id])
@story.comments.create params[:comment]
respond_to do |format|
format.js
end
end
It responds with
Missing template comments/create.erb in view path app/views
Why wont it find create.rjs?
--
Posted via http://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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment