Displaying 1 result from an estimated 1 matches for "context_object".
2011 Jan 25
0
Rails 3 - Helping with a Commenting Module
class CommentsController < ApplicationController
def create
@commentable= context_object()
@comment =
@commentable.comments.build(params[:comment].merge(:user_id =>
current_user.id))
if @comment.save
respond_to do |format|
format.js
end
else
render :action => ''new''
end
end
pri...