fixes build

adds empty featured_debates
This commit is contained in:
Juanjo Bazán
2015-08-04 17:56:38 +02:00
parent 4344bc121f
commit c3046ccc2b
6 changed files with 67 additions and 63 deletions

View File

@@ -1,15 +1,16 @@
class DebatesController < ApplicationController
include RecaptchaHelper
include RecaptchaHelper
before_action :set_debate, only: [:show, :edit, :update]
before_action :authenticate_user!, except: [:show, :index]
before_action :validate_ownership, only: [:edit, :update]
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 = []
end
def show
@@ -53,7 +54,7 @@ class DebatesController < ApplicationController
def verify_captcha?
return true unless recaptcha_keys?
verify_recaptcha(model: @debate)
verify_recaptcha(model: @debate)
end
end