Displaying 1 result from an estimated 1 matches for "view_article_path".
Did you mean:
new_article_path
2011 Dec 16
3
PROBLEN IN AJAX USING RJS
...def create
@comment = Comment.new(params[:comment])
@comment.user_id = params[:user_id]
@comment.article_id = params[:article_id]
if @comment.save
respond_to do |format|
flash[:notice] = "Comment was Successfully created"
format.html { redirect_to view_article_path(params[:user_id],
params[:article_id] ) }
format.js {
render :update do |page|
end
}
end
create.rjs
----------
page.insert_html :bottom, :comment, :partial => ''comment'', :object
=> @comment
page[:comment_comment].reset
page.re...