app/controllers/commontator/threads_controller.rb~ in commontator-1.0.6 vs app/controllers/commontator/threads_controller.rb~ in commontator-1.1.0
- old
+ new
@@ -1,25 +1,24 @@
module Commontator
class ThreadsController < ApplicationController
before_filter :get_thread
- before_filter :get_commontable_url, :only => :show
# GET /threads/1
def show
commontator_thread_show(@thread.commontable)
respond_to do |format|
- format.html { redirect_to @commontable_url }
+ format.html { redirect_to commontable_url }
format.js
end
end
# PUT /threads/1/close
def close
raise SecurityTransgression unless @thread.can_be_edited_by?(@user)
- @thread.errors.add(:base, "This thread has already been closed") \
+ @thread.errors.add(:base, 'This thread has already been closed.') \
unless @thread.close(@user)
respond_to do |format|
format.html { redirect_to @thread }
format.js { render :show }
@@ -28,10 +27,10 @@
# PUT /threads/1/reopen
def reopen
raise SecurityTransgression unless @thread.can_be_edited_by?(@user)
- @thread.errors.add(:base, "This thread is not closed") \
+ @thread.errors.add(:base, 'This thread is not closed.') \
unless @thread.reopen
respond_to do |format|
format.html { redirect_to @thread }
format.js { render :show }