Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2ef399a5
Commit
2ef399a5
authored
Jul 04, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `check_<feature>_available!` to trigger method missing
Similar to how we check project features.
parent
cf98a6d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/controllers/ee/groups/application_controller.rb
app/controllers/ee/groups/application_controller.rb
+1
-1
app/controllers/groups/analytics_controller.rb
app/controllers/groups/analytics_controller.rb
+1
-1
No files found.
app/controllers/ee/groups/application_controller.rb
View file @
2ef399a5
...
@@ -7,7 +7,7 @@ module EE
...
@@ -7,7 +7,7 @@ module EE
def
method_missing
(
method_sym
,
*
arguments
,
&
block
)
def
method_missing
(
method_sym
,
*
arguments
,
&
block
)
case
method_sym
.
to_s
case
method_sym
.
to_s
when
/\Acheck_
group_
(.*)_available!\z/
when
/\Acheck_(.*)_available!\z/
check_group_feature_available!
(
$1
.
to_sym
)
check_group_feature_available!
(
$1
.
to_sym
)
else
else
super
super
...
...
app/controllers/groups/analytics_controller.rb
View file @
2ef399a5
class
Groups::AnalyticsController
<
Groups
::
ApplicationController
class
Groups::AnalyticsController
<
Groups
::
ApplicationController
before_action
:group
before_action
:group
before_action
:check_
group_
contribution_analytics_available!
before_action
:check_contribution_analytics_available!
layout
'group'
layout
'group'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment