Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fire - Alice D #46

Open
wants to merge 67 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
5841dbf
initial rails setup
codeandmorecode Nov 6, 2020
1eb2ce9
seeds reading from csv
codeandmorecode Nov 7, 2020
17941f5
Work controller; methods index show update edit destroy new create
codeandmorecode Nov 7, 2020
f4dbd32
work index controller method, work index view page
codeandmorecode Nov 7, 2020
eeefd97
index page with a list of all works for each category
codeandmorecode Nov 7, 2020
f7b58d7
show page / detail page for each work
codeandmorecode Nov 7, 2020
db5e402
create method in controller, new method in controller, view page for new
codeandmorecode Nov 8, 2020
abaa126
edit method in work controller; edit view page
codeandmorecode Nov 8, 2020
c59f2a4
partial form created; new view and edit view changed using partial form
codeandmorecode Nov 8, 2020
18a7c88
edit method in controller updated
codeandmorecode Nov 8, 2020
f77ef60
destroy method in work controller
codeandmorecode Nov 8, 2020
7cefcdb
edit, delete, return to work list links added to each show (work) page
codeandmorecode Nov 8, 2020
b16d267
work validations in model
codeandmorecode Nov 8, 2020
b2f4a03
homepages controller
codeandmorecode Nov 8, 2020
dfd698d
top 10 books and albums in homepage; only missing business logic
codeandmorecode Nov 8, 2020
8e59ed1
merged home
codeandmorecode Nov 8, 2020
47f227b
removed sample method
codeandmorecode Nov 8, 2020
dbc3081
Merge branch 'work'
codeandmorecode Nov 8, 2020
f1a6541
Spotlight in homepages index
codeandmorecode Nov 8, 2020
5cc8de3
root to route changed in routes.rb
codeandmorecode Nov 8, 2020
9945b85
Temporary only showing ten work for each of albums, books, and spotli…
codeandmorecode Nov 8, 2020
8a78fec
merged home
codeandmorecode Nov 8, 2020
9e03ec3
index method from homepages controller fixed
codeandmorecode Nov 8, 2020
5989d83
Merge branch 'master' of https://github.com/Ada-C14/media-ranker
codeandmorecode Nov 9, 2020
cac32b4
fixed templates
codeandmorecode Nov 10, 2020
57b9d30
update .gitignore
codeandmorecode Nov 10, 2020
84fce0d
tests for work controller
codeandmorecode Nov 10, 2020
450e04c
application.rb line changed
codeandmorecode Nov 10, 2020
29cb7c8
navigation bar, copyright footer
codeandmorecode Nov 10, 2020
e319328
error messages for each field in add new work if blank; work model te…
codeandmorecode Nov 10, 2020
6162931
flash messages for all controller methods that display to user; and a…
codeandmorecode Nov 11, 2020
0355448
sample 10 methods for albums, books, and spotlights in homepages_cont…
codeandmorecode Nov 11, 2020
696d6f6
user model created; users_controller created
codeandmorecode Nov 12, 2020
b6108e3
routes updated with users
codeandmorecode Nov 12, 2020
6e1c9ae
login_form method in users_controller
codeandmorecode Nov 12, 2020
d23d8c1
users views form created
codeandmorecode Nov 12, 2020
7e5ccb6
login method in users_controller
codeandmorecode Nov 12, 2020
de31aa5
current method in users_controller; current users view created
codeandmorecode Nov 12, 2020
dc8ad5e
routes fixed
codeandmorecode Nov 12, 2020
58c7ece
spotlights fixed
codeandmorecode Nov 12, 2020
43591c6
logout method in users_controller
codeandmorecode Nov 12, 2020
f7bbae6
users_controller_test.rb updated; test_helper.rb updated
codeandmorecode Nov 12, 2020
785a0a6
combined two methods in test_helper.rb
codeandmorecode Nov 13, 2020
2658fea
tests for users updated; yml created; test_helper updated
codeandmorecode Nov 13, 2020
eb5636c
vote.rb updated
codeandmorecode Nov 13, 2020
4434c41
work.rb and user.rb updated
codeandmorecode Nov 13, 2020
bf41d27
current test updated for case where user not logged in
codeandmorecode Nov 15, 2020
2df6d43
pseudocode for upvote method
codeandmorecode Nov 15, 2020
61150c2
switching branches; mandatory commit
codeandmorecode Nov 15, 2020
54d6256
find_work method in work controller with before_action
codeandmorecode Nov 15, 2020
42d5ade
before action and skip actions
codeandmorecode Nov 15, 2020
34e20d9
ApplicationController methods current_user and require_login fixed
codeandmorecode Nov 15, 2020
82f0d82
work.rb and user.rb updated with has_many through relationships
codeandmorecode Nov 15, 2020
265aada
VotesController generate with methods
codeandmorecode Nov 15, 2020
9c5bc28
routes updated with votes controller routes
codeandmorecode Nov 15, 2020
1185452
votes_controller.rb method create updated
codeandmorecode Nov 15, 2020
dbe1f6d
users show page created
codeandmorecode Nov 15, 2020
e822b83
user index updated with link to user show for each user
codeandmorecode Nov 15, 2020
6cf7cd6
show pages for works, and users updated with tables and vote counts
codeandmorecode Nov 16, 2020
fa00aa5
code dried up in index.html.erb and homepages_controller.rb using has…
codeandmorecode Nov 16, 2020
97ae7e4
code dried up in works/index.html.erb with work method self.category …
codeandmorecode Nov 16, 2020
571420b
top_ten method refactored using category_organized class method
codeandmorecode Nov 16, 2020
d013af9
refactored with partials for views
codeandmorecode Nov 16, 2020
78ed277
model tests in progress for work, vote, and user
codeandmorecode Nov 16, 2020
1846db1
model tests for vote, work, and user updated
codeandmorecode Nov 17, 2020
035a9f0
model tests finished
codeandmorecode Nov 17, 2020
004da27
database.yml changed
codeandmorecode Nov 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Work controller; methods index show update edit destroy new create
codeandmorecode committed Nov 7, 2020
commit 17941f5d61a7cb04d9f9e7a9e1aa91ca5fe62d15
3 changes: 3 additions & 0 deletions app/assets/stylesheets/work.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the Work controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/
22 changes: 22 additions & 0 deletions app/controllers/work_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class WorkController < ApplicationController
def index
end

def show
end

def update
end

def edit
end

def destroy
end

def new
end

def create
end
end
2 changes: 2 additions & 0 deletions app/helpers/work_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module WorkHelper
end
2 changes: 2 additions & 0 deletions app/views/work/create.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Work#create</h1>
<p>Find me in app/views/work/create.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/work/destroy.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Work#destroy</h1>
<p>Find me in app/views/work/destroy.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/work/edit.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Work#edit</h1>
<p>Find me in app/views/work/edit.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/work/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Work#index</h1>
<p>Find me in app/views/work/index.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/work/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Work#new</h1>
<p>Find me in app/views/work/new.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/work/show.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Work#show</h1>
<p>Find me in app/views/work/show.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/work/update.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Work#update</h1>
<p>Find me in app/views/work/update.html.erb</p>
7 changes: 7 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Rails.application.routes.draw do
get 'work/index'
get 'work/show'
get 'work/update'
get 'work/edit'
get 'work/destroy'
get 'work/new'
get 'work/create'
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end
39 changes: 39 additions & 0 deletions test/controllers/work_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
require 'test_helper'

class WorkControllerTest < ActionDispatch::IntegrationTest
test "should get index" do
get work_index_url
assert_response :success
end

test "should get show" do
get work_show_url
assert_response :success
end

test "should get update" do
get work_update_url
assert_response :success
end

test "should get edit" do
get work_edit_url
assert_response :success
end

test "should get destroy" do
get work_destroy_url
assert_response :success
end

test "should get new" do
get work_new_url
assert_response :success
end

test "should get create" do
get work_create_url
assert_response :success
end

end