merges master and fixes conflicts
This commit is contained in:
@@ -6,10 +6,11 @@ class DebatesController < ApplicationController
|
||||
|
||||
def index
|
||||
if params[:tag]
|
||||
@debates = Debate.tagged_with(params[:tag])
|
||||
@debates = Debate.tagged_with(params[:tag]).order("created_at DESC")
|
||||
else
|
||||
@debates = Debate.all
|
||||
@debates = Debate.all.order("created_at DESC")
|
||||
end
|
||||
@featured_debates = @debates.to_a.shift(3)
|
||||
end
|
||||
|
||||
def show
|
||||
@@ -51,4 +52,9 @@ class DebatesController < ApplicationController
|
||||
raise ActiveRecord::RecordNotFound unless @debate.editable_by?(current_user)
|
||||
end
|
||||
|
||||
def verify_captcha?
|
||||
return true unless recaptcha_keys?
|
||||
verify_recaptcha(model: @debate)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user