Adds view mode on debates
This commit is contained in:
@@ -5,6 +5,7 @@ class DebatesController < ApplicationController
|
||||
|
||||
before_action :parse_tag_filter, only: :index
|
||||
before_action :authenticate_user!, except: [:index, :show, :map]
|
||||
before_action :set_view, only: :index
|
||||
|
||||
feature_flag :debates
|
||||
|
||||
@@ -52,4 +53,8 @@ class DebatesController < ApplicationController
|
||||
Debate
|
||||
end
|
||||
|
||||
def set_view
|
||||
@view = (params[:view] == "minimal") ? "minimal" : "default"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user