Sha256: 80c51c605b908c932ff27decb015265f00054531bb308b1827ed8383667460b1
Contents?: true
Size: 530 Bytes
Versions: 11
Compression:
Stored size: 530 Bytes
Contents
module Rostra class CommentsController < ApplicationController load_and_authorize_resource before_filter :fetch_question def create if @comment.save redirect_to @question end end def update @comment.update_attributes(:comment => params[:value]) render :text => @comment.comment end def destroy @comment.destroy redirect_to @question end private def fetch_question @question = Question.find(params[:question_id]) end end end
Version data entries
11 entries across 11 versions & 1 rubygems