Sha256: d6ef9d3bf77d4428fb63179dab67db13440327e65a19909f3b2d2d7c92eb97a3
Contents?: true
Size: 585 Bytes
Versions: 14
Compression:
Stored size: 585 Bytes
Contents
module Knitkit class CommentsController < BaseController def add user = current_user content = Content.find(params[:content_id]) comment = params[:comment] @comment = content.add_comment({:commentor_name => user.party.description, :email => user.email, :comment => comment}) render :text => (@comment.valid? ? '<div class="sexysuccess">Comment pending approval.</span>' : '<div class="sexyerror">Error. Comment cannot be blank.</span>') end #no section to set def set_section return false end end end
Version data entries
14 entries across 14 versions & 1 rubygems