app/controllers/rostra/answers_controller.rb in rostra-0.0.14 vs app/controllers/rostra/answers_controller.rb in rostra-0.0.15
- old
+ new
@@ -1,40 +1,5 @@
module Rostra
- class AnswersController < ApplicationController
- load_and_authorize_resource
- before_filter :fetch_question
-
- def vote
- rostra_user.vote_on(@answer, params[:vote_direction])
-
- respond_to do |format|
- format.html { redirect_to question_path(@question, anchor: "rostra_answer_#{@answer.id}") }
- format.js
- end
- end
-
- def create
- if @answer.save
- redirect_to question_path(@question, anchor: "rostra_answer_#{@answer.id}")
- else
- redirect_to question_path(@question, anchor: 'new_rostra_answer')
- end
- end
-
- def edit
- end
-
- def update
- if @answer.update_attributes(params[:answer])
- redirect_to question_path(@question, anchor: "rostra_answer_#{@answer.id}")
- else
- render :edit
- end
- end
-
- private
-
- def fetch_question
- @question = Question.find(params[:question_id])
- end
+ class AnswersController < Rostra::Base::AnswersController
+ # Override existing actions here
end
end