forked from shanil-puri/blogger
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shanil Puri
committed
Sep 23, 2014
1 parent
46614c3
commit 7b0e5a3
Showing
10 changed files
with
69 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,41 @@ | ||
class UserController < ApplicationController | ||
|
||
## | ||
# Function to list all the users. | ||
# This is to be used by job seekers to list all the employers by name | ||
## | ||
def index | ||
@users = User.all | ||
@users = User.get_all_employers | ||
end | ||
|
||
## | ||
# Function for the editing of the used profile. | ||
# Uses the user_params for update. | ||
## | ||
def edit | ||
|
||
end | ||
|
||
## | ||
# Deletes a user. | ||
# A user may chose to terminate his association with the job portal. | ||
## | ||
def destroy | ||
|
||
end | ||
|
||
## | ||
# Function to update a resume. | ||
# User model accepts nested resources for resume. | ||
# One to One relationship for Resume and User. | ||
## | ||
def update_resume | ||
|
||
end | ||
|
||
private | ||
|
||
def user_params | ||
params.require(:user).permit(:name, :email, :phone, :resume) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div><%= link_to "Create New Editor", new_admin_user_path %></div> | ||
<div><%= link_to "View All Users", user_index_path %></div> | ||
<div><%= link_to "View All Drafted Posts", posts_drafts_path %></div> | ||
<div><%= link_to "View All Published Posts", posts_published_path %></div> | ||
<div><%= link_to "Create new post", new_post_path %></div> | ||
<div><%= link_to "Create New Editor", "#" %></div> | ||
<div><%= link_to "View All Users", "#" %></div> | ||
<div><%= link_to "View All Drafted Posts", "#" %></div> | ||
<div><%= link_to "View All Published Posts", "#" %></div> | ||
<div><%= link_to "Create new post", "#" %></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<div><%= link_to "View All Users", user_index_path %></div> | ||
<div><%= link_to "View Articles", post_index_path %></div> | ||
<% if current_user.can_publish? %> | ||
<div><%= link_to "View All Drafted Posts", posts_drafts_path %></div> | ||
<div><%= link_to "View All Drafted Posts", "#" %></div> | ||
<% end %> | ||
<div><%= link_to "Create new post", new_post_path %></div> | ||
<div><%= link_to "Create new post", "#" %></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddPhoneToUser < ActiveRecord::Migration | ||
def change | ||
add_column :users, :phone, :integer | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters