Displaying 1 result from an estimated 1 matches for "story_url".
2008 Jan 23
11
Rails 2.0.2 + RJS
...r
=> ''"#84E003"''}
commentscontroller.rb:
def create
@comment = Comment.new(params[:comment])
@comment.user = User.find(current_user)
@comment.story = Story.find(params[:story_id])
respond_to do |format|
if @comment.save
format.html { redirect_to story_url(@comment.story) }
format.js
else
format.html { redirect_to story_url(@comment.story) }
end
end
end
I have tried changing to create.js.rjs, but that makes no difference?
Doe anyone have any experience with this in Rails 2.0.2?
PJ.
--~--~---------~--~----~------------~-------...