Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
veNJOB
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thanh Hung Pham
veNJOB
Commits
70e6d281
Commit
70e6d281
authored
Jul 18, 2017
by
Thanh Hung Pham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix route admin page
parent
c4606e43
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
11 deletions
+4
-11
app/controllers/admins_controller.rb
+3
-7
app/controllers/application_controller.rb
+1
-1
app/views/admins/search.html.erb
+0
-0
config/routes.rb
+0
-3
No files found.
app/controllers/admins_controller.rb
View file @
70e6d281
class
AdminsController
<
ApplicationController
class
AdminsController
<
ApplicationController
def
applies
def
search
@cities
=
City
.
all
.
map
{
|
c
|
[
c
.
name
,
c
.
id
]
}
@cities
=
City
.
all
.
map
{
|
c
|
[
c
.
name
,
c
.
id
]
}
@categories
=
Category
.
all
.
map
{
|
c
|
[
c
.
name
,
c
.
id
]
}
@categories
=
Category
.
all
.
map
{
|
c
|
[
c
.
name
,
c
.
id
]
}
@applied_jobs
=
Apply
.
all
.
page
params
[
:page
]
@applied_jobs
=
Apply
.
all
.
page
params
[
:page
]
end
#
# redirect_to admins_applies_path
def
search
@applied_jobs
=
Apply
.
all
.
page
params
[
:page
]
redirect_to
admins_applies_path
end
end
end
end
app/controllers/application_controller.rb
View file @
70e6d281
...
@@ -14,7 +14,7 @@ class ApplicationController < ActionController::Base
...
@@ -14,7 +14,7 @@ class ApplicationController < ActionController::Base
def
after_sign_in_path_for
(
resource
)
def
after_sign_in_path_for
(
resource
)
if
admin_signed_in?
if
admin_signed_in?
admins_
applies
_path
admins_
search
_path
else
else
stored_location_for
(
resource
)
||
stored_location_for
(
resource
)
||
if
resource
.
is_a?
(
User
)
&&
resource
.
can_publish?
if
resource
.
is_a?
(
User
)
&&
resource
.
can_publish?
...
...
app/views/admins/
applies
.html.erb
→
app/views/admins/
search
.html.erb
View file @
70e6d281
File moved
config/routes.rb
View file @
70e6d281
Rails
.
application
.
routes
.
draw
do
Rails
.
application
.
routes
.
draw
do
get
'admins/applies'
devise_for
:admins
devise_for
:admins
root
'static_pages#home'
root
'static_pages#home'
...
@@ -22,7 +20,6 @@ Rails.application.routes.draw do
...
@@ -22,7 +20,6 @@ Rails.application.routes.draw do
get
'jobs/favorited_jobs'
,
to:
'jobs#favorited_jobs'
get
'jobs/favorited_jobs'
,
to:
'jobs#favorited_jobs'
get
'jobs/history_jobs'
,
to:
'jobs#history_jobs'
get
'jobs/history_jobs'
,
to:
'jobs#history_jobs'
get
'admins/applies'
,
to:
'admins#applies'
get
'admins/search'
,
to:
'admins#search'
get
'admins/search'
,
to:
'admins#search'
post
'admins/search'
,
to:
'admins#search'
post
'admins/search'
,
to:
'admins#search'
...
...
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