Adds view mode on debates

This commit is contained in:
decabeza
2018-03-23 20:04:19 +01:00
parent bdedb023d1
commit c4dc7bc831
6 changed files with 106 additions and 1 deletions

View File

@@ -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