diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-05-01 10:39:11 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-05-01 10:39:16 +0200 |
commit | 92fd3ccee05acdfd5e498734ed287458a8dd21a3 (patch) | |
tree | a794a8017636ce7f50a7f4ef4201395894a5451e /app/controllers/groups_controller.rb | |
parent | ae09c2a6db0d15caedc080c319add147c79fd02a (diff) | |
download | gitlab-ce-92fd3ccee05acdfd5e498734ed287458a8dd21a3.tar.gz |
Add helpers for header title and sidebar, and move setting those from controllers to layouts.
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r-- | app/controllers/groups_controller.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 66e92abff8d..34f0b257db3 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -12,6 +12,8 @@ class GroupsController < Groups::ApplicationController before_action :load_projects, except: [:new, :create, :projects, :edit, :update] before_action :event_filter, only: :show + layout :determine_layout + def new @group = Group.new end @@ -116,11 +118,11 @@ class GroupsController < Groups::ApplicationController end end - def set_title + def determine_layout if [:new, :create].include?(action_name.to_sym) - @title = 'New Group' + 'application' else - super + 'group' end end |