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
2be5aab4
Commit
2be5aab4
authored
Aug 08, 2014
by
Jan-Willem van der Meer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use singular route
Even simpler
parent
dbc60e7f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
app/controllers/admin/emails_controller.rb
app/controllers/admin/emails_controller.rb
+2
-2
config/routes.rb
config/routes.rb
+1
-1
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+1
-1
spec/routing/admin_routing_spec.rb
spec/routing/admin_routing_spec.rb
+2
-2
No files found.
app/controllers/admin/emails_controller.rb
View file @
2be5aab4
class
Admin::EmailsController
<
Admin
::
ApplicationController
def
index
render
text:
'hello world'
,
layout:
nil
def
show
render
text:
'hello world'
end
end
config/routes.rb
View file @
2be5aab4
...
...
@@ -86,7 +86,7 @@ Gitlab::Application.routes.draw do
resources
:broadcast_messages
,
only:
[
:index
,
:create
,
:destroy
]
resource
:logs
,
only:
[
:show
]
resource
:background_jobs
,
controller:
'background_jobs'
,
only:
[
:show
]
resource
s
:emails
,
only:
[
:index
]
resource
:email
,
only:
[
:show
]
resources
:projects
,
constraints:
{
id:
/[a-zA-Z.\/0-9_\-]+/
},
only:
[
:index
,
:show
]
do
member
do
...
...
features/steps/shared/paths.rb
View file @
2be5aab4
...
...
@@ -170,7 +170,7 @@ module SharedPaths
end
step
'I visit admin email page'
do
visit
admin_email
s
_path
visit
admin_email_path
end
# ----------------------------------------
# Generic Project
...
...
spec/routing/admin_routing_spec.rb
View file @
2be5aab4
...
...
@@ -120,7 +120,7 @@ describe Admin::DashboardController, "routing" do
end
describe
Admin
::
EmailsController
,
"routing"
do
it
"to #
index
"
do
get
(
"/admin/email
s"
).
should
route_to
(
'admin/emails#index
'
)
it
"to #
show
"
do
get
(
"/admin/email
"
).
should
route_to
(
'admin/emails#show
'
)
end
end
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