vote action not allowed for unauthenticated users

This commit is contained in:
Juanjo Bazán
2015-08-05 14:34:55 +02:00
parent dda5963641
commit 062ef365ad

View File

@@ -1,7 +1,7 @@
class DebatesController < ApplicationController
include RecaptchaHelper
before_action :set_debate, only: [:show, :edit, :update, :vote]
before_action :authenticate_user!, except: [:index, :show, :vote]
before_action :authenticate_user!, except: [:index, :show]
before_action :validate_ownership, only: [:edit, :update]
def index