app/controllers/commontator/subscriptions_controller.rb~ in commontator-0.5.14 vs app/controllers/commontator/subscriptions_controller.rb~ in commontator-1.0.0
- old
+ new
@@ -5,15 +5,15 @@
# POST /1/subscribe
def create
raise SecurityTransgression unless @thread.can_subscribe?(@user)
- @thread.errors.add(:base, "You are already subscribed to this thread") \
+ @thread.errors.add(:subscription, "You are already subscribed to this thread") \
unless @thread.subscribe(@user)
respond_to do |format|
- format.html { redirect_to @commontable_url }
+ format.html { redirect_to @thread }
format.js { render :subscribe }
end
end
@@ -23,10 +23,10 @@
@thread.errors.add(:base, "You are not subscribed to this thread") \
unless @thread.unsubscribe(@user)
respond_to do |format|
- format.html { redirect_to @commontable_url }
+ format.html { redirect_to @thread }
format.js { render :subscribe }
end
end
end
end