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

Don't merge - Steven for review #33

Open
wants to merge 148 commits into
base: review-base
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
0dd9f7f
Initial commit
kevalwell Apr 10, 2015
d9d0748
Merge branch 'master' of https://github.com/kevalwell/StackOverflow
Apr 10, 2015
e50a028
complete question/answer migrations
Apr 10, 2015
e0bb83a
complete header styling
Apr 10, 2015
d653b67
columns
Apr 10, 2015
3082aa4
set database relationships
Apr 10, 2015
efa3b80
Merge branch 'Malcolm_header'
hoathenguyen85 Apr 10, 2015
ca75cfa
Ready User Controller
kevalwell Apr 10, 2015
8008fb1
Merge pull request #2 from kevalwell/ka/NewUser
Apr 10, 2015
25cb8eb
finished seed file
samguergen Apr 10, 2015
50f5b4b
created link_to signup
kevalwell Apr 10, 2015
ec9d235
fixed minor syntax error in seed. seed now working
samguergen Apr 10, 2015
62ff66b
Merge pull request #3 from kevalwell/Sam_seed
hoathenguyen85 Apr 10, 2015
ee13ebd
created signup link
kevalwell Apr 10, 2015
ab12982
Made question skeleton
hoathenguyen85 Apr 10, 2015
8847f11
Created User Essentials
kevalwell Apr 10, 2015
ac9589a
added index method to user controller
samguergen Apr 10, 2015
3418b94
Finish question/new
hoathenguyen85 Apr 10, 2015
405dd5d
Merge pull request #4 from kevalwell/question_new
kevalwell Apr 10, 2015
38d08b4
Merge pull request #5 from kevalwell/Sam_User_Index
hoathenguyen85 Apr 10, 2015
43aad9f
added custom route for login
samguergen Apr 10, 2015
3578d61
Made question/show page
hoathenguyen85 Apr 10, 2015
c1a64fb
Made show action method for the question controller
hoathenguyen85 Apr 10, 2015
295c257
finished login controller
samguergen Apr 10, 2015
c9674e4
Create view for new user
kevalwell Apr 10, 2015
42b7513
finished login form on login erb page
samguergen Apr 10, 2015
828ea94
Made show page for question controller. shows question, answers, and…
hoathenguyen85 Apr 10, 2015
0651f74
finished login route - login form displays success and redirect success
samguergen Apr 10, 2015
8970673
Merge pull request #6 from kevalwell/Sam_Login
samguergen Apr 10, 2015
d4325ce
Add answers controller routes
hoathenguyen85 Apr 10, 2015
df9698d
create user form
kevalwell Apr 10, 2015
d6f2abb
Merge branch 'master' into ka/NewUser
hoathenguyen85 Apr 10, 2015
0e40eb2
Merge branch 'ka/NewUser'
hoathenguyen85 Apr 10, 2015
db7ae59
Users working
kevalwell Apr 10, 2015
af4693b
Made answer create form
hoathenguyen85 Apr 10, 2015
eead885
view user page
kevalwell Apr 10, 2015
1d15602
Merge branch 'master' of github.com:kevalwell/StackOverflow into ques…
hoathenguyen85 Apr 11, 2015
3d3dae6
Merge pull request #8 from kevalwell/ka/NewUser
hoathenguyen85 Apr 11, 2015
24a427d
made Answer Controller
hoathenguyen85 Apr 11, 2015
445d33f
Add answer form
hoathenguyen85 Apr 11, 2015
28b0f32
Fix routes by merging into resource block
hoathenguyen85 Apr 11, 2015
09392cb
Moved erb back
hoathenguyen85 Apr 11, 2015
4d1c79a
Merge branch 'master' of github.com:kevalwell/StackOverflow into ques…
hoathenguyen85 Apr 11, 2015
5280d2b
Save answer from question#show
hoathenguyen85 Apr 11, 2015
f06a96f
header auth additions/routes additions/questions index/answers edit/s…
Apr 11, 2015
78da0cb
Merge pull request #9 from kevalwell/question_show
hoathenguyen85 Apr 11, 2015
3a163ae
Merge branch 'master' into Malcolm_Friday
hoathenguyen85 Apr 11, 2015
c8421eb
Merge branch 'Malcolm_Friday'
hoathenguyen85 Apr 11, 2015
fb39f8e
Fixed minor question code
hoathenguyen85 Apr 11, 2015
5e24a30
clean up controllers
Apr 11, 2015
55f9b1c
link to users
Apr 11, 2015
9d9ffa1
questions index
Apr 11, 2015
ca5bdd2
finished destroy method for questions
samguergen Apr 11, 2015
39d4906
finished create route for questions
samguergen Apr 11, 2015
4d5a15b
user show
Apr 11, 2015
84b645b
finished delete question link on questions show page
samguergen Apr 11, 2015
41fe156
delete route and link working succesfully for questions.
samguergen Apr 11, 2015
6544d88
finished add question link
samguergen Apr 11, 2015
ff48b5f
Merge pull request #12 from kevalwell/Sam_Delete_Create_Question
samguergen Apr 11, 2015
3f7d072
Merge branch 'master' into Malcolm_front_pt_1
hoathenguyen85 Apr 11, 2015
fc0a375
Merge branch 'Malcolm_front_pt_1'
hoathenguyen85 Apr 11, 2015
0156e1f
finished answer delete route
samguergen Apr 11, 2015
3f44129
Update answer#create/update
hoathenguyen85 Apr 11, 2015
7ec6c60
fixed comment edit route
samguergen Apr 11, 2015
f330df7
Merge branch 'master' into Sam_AnswerDeleterouteEditLink
hoathenguyen85 Apr 11, 2015
5fce53f
Merge branch 'Sam_AnswerDeleterouteEditLink'
hoathenguyen85 Apr 11, 2015
0c97e87
Merge pull request #13 from kevalwell/answer
hoathenguyen85 Apr 11, 2015
0d1ba30
made existing destroy method into logout method, so that destroy method
samguergen Apr 11, 2015
33a37fc
finished user destroy method and link from user show page
samguergen Apr 11, 2015
3981edf
Fix Login/logout on layout
Apr 11, 2015
438e5fe
added link to user show on user index
samguergen Apr 11, 2015
f8a8d42
added edit and update rout for user
samguergen Apr 11, 2015
7649419
finished edit route for user and link to edit route from user show page
samguergen Apr 11, 2015
33c8c45
Merge pull request #15 from kevalwell/ka/login
hoathenguyen85 Apr 11, 2015
f315335
Merge pull request #16 from kevalwell/Sam_User_EditDelete
samguergen Apr 11, 2015
32aac22
fix auth for header
Apr 11, 2015
4f30139
fixed header
Apr 11, 2015
1e17abd
fix header
Apr 11, 2015
7537732
fixed header
Apr 11, 2015
ca233c6
Merge branch 'master' of https://github.com/kevalwell/StackOverflow i…
Apr 11, 2015
115c8be
Merge pull request #17 from kevalwell/Malcolm_front_pt_1
hoathenguyen85 Apr 11, 2015
59c3ba4
fix login
Apr 11, 2015
9fdb57f
final header fix
Apr 11, 2015
12bd93a
Merge branch 'master' into Malcolm_front_pt_1
hoathenguyen85 Apr 11, 2015
4abb427
Merge branch 'Malcolm_front_pt_1'
hoathenguyen85 Apr 11, 2015
9fa6e22
Made polymorphic comments and votes table
Apr 11, 2015
8274da3
edit show
Apr 11, 2015
764b21e
Add links for user and question
Apr 11, 2015
5e7491b
Merge pull request #19 from kevalwell/poly_tables
hoathenguyen85 Apr 11, 2015
67a2908
Merge branch 'master' of https://github.com/kevalwell/StackOverflow
Apr 11, 2015
d913054
Put question and answer links on user_index page
kevalwell Apr 11, 2015
31d2f0f
Merge pull request #20 from kevalwell/ka/question_links
kevalwell Apr 11, 2015
a813ff5
added partial to votes erb page on questions show page
samguergen Apr 11, 2015
259ac78
question show user sections
Apr 11, 2015
1b8a36d
added votes controller and nested resources votes inside resources an…
samguergen Apr 11, 2015
8e6bd4f
Merge pull request #21 from kevalwell/question_show_frontend
hoathenguyen85 Apr 11, 2015
9d84042
user cant answer unless logged in
Apr 11, 2015
79e7123
Merge pull request #22 from kevalwell/answer_question_auth
hoathenguyen85 Apr 11, 2015
7974aa1
create comment seeds && Comment folderpaths
kevalwell Apr 11, 2015
f9800da
created comments resource
kevalwell Apr 11, 2015
8523e2b
made links
Apr 11, 2015
ee044b4
Created form that accepts user_id
kevalwell Apr 11, 2015
bfad446
more styling
Apr 11, 2015
9f7512c
Merge pull request #23 from kevalwell/sign_login_ajax
hoathenguyen85 Apr 11, 2015
16f10c3
altered comment controller
kevalwell Apr 11, 2015
724ff8d
Created Comment area for answer
kevalwell Apr 11, 2015
b62593e
Fix bug...use reg variable and not instance variable
hoathenguyen85 Apr 11, 2015
292797d
Merge pull request #25 from kevalwell/answer_bug
hoathenguyen85 Apr 11, 2015
831556a
vote links working but like and dislike links cannot both display on …
samguergen Apr 12, 2015
8feba3d
both like and dislike displaing with link_to and not button
samguergen Apr 12, 2015
5087c2d
delete unnecessary method for downpost- all is working for votes
samguergen Apr 12, 2015
62fc16d
Merge branch 'master' into Sam_Votes, also updated the comment & vote…
Apr 12, 2015
acdade0
Merge branch 'Sam_Votes'
Apr 12, 2015
b0f9938
user index names
Apr 12, 2015
79235ed
question index links fix
Apr 12, 2015
5d38de8
user index contents height fix
Apr 12, 2015
86b1bf8
Merge branch 'master' into ka/comments
Apr 12, 2015
6264ce7
Fix Login for incorrect email error
kevalwell Apr 12, 2015
3d10130
created comment controller new form and partial
kevalwell Apr 12, 2015
cd11a54
Update link to use id and type of the comment table
Apr 12, 2015
02e17ce
Comment now carries id and parentquestion
kevalwell Apr 12, 2015
2a0fe9f
Comment Working
kevalwell Apr 12, 2015
8e1dff1
answer amount on question show
Apr 12, 2015
0ad240f
Comments as unordered list displaying comment content
kevalwell Apr 12, 2015
c051be0
Create spec files
kevalwell Apr 12, 2015
1720753
Created supporting spec files
kevalwell Apr 12, 2015
10ea860
User_spec && Question Spec
kevalwell Apr 12, 2015
c87b57c
edited gemfile
kevalwell Apr 12, 2015
db2f9d5
reformatted comments
kevalwell Apr 12, 2015
c6d7f91
rspecs failing but running
kevalwell Apr 12, 2015
ee93eba
vote answers in votes controller
Apr 12, 2015
5451a96
Validations on user email
kevalwell Apr 12, 2015
ed2b8fe
Tests Not passing yet
kevalwell Apr 12, 2015
cf0a34b
Merge pull request #28 from kevalwell/ka/comment_working
kevalwell Apr 12, 2015
41b2221
Add a comment
kevalwell Apr 12, 2015
2e1d119
Merge pull request #29 from kevalwell/ka/tweaks
kevalwell Apr 12, 2015
77fe045
Comment saves for answers and questions
Apr 12, 2015
7742d7c
Merge branch 'ka/comments'
Apr 12, 2015
4686095
answer votes
Apr 12, 2015
59b18cb
Merge pull request #30 from kevalwell/Malcolm_Sunday_edits
hoathenguyen85 Apr 12, 2015
68ff5f6
Nifty Search Bar for User Index
kevalwell Apr 13, 2015
ae425a2
comment/edit/delete styling
Apr 13, 2015
78a687d
delete/edit styling
Apr 13, 2015
48b8561
footer
Apr 13, 2015
92928a5
Merge pull request #32 from kevalwell/final_edits
Apr 13, 2015
95db26d
Merge pull request #31 from kevalwell/ka/search_bar
kevalwell Apr 13, 2015
ff5dce3
Merge branch 'master' of https://github.com/kevalwell/StackOverflow
Apr 13, 2015
f3d2037
Merge branch 'master' of https://github.com/kevalwell/StackOverflow
Apr 13, 2015
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
Binary file added .DS_Store
Binary file not shown.
13 changes: 11 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,27 @@ gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'
group :test, :development do
gem "rspec-rails", "~> 2.0"
end


# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'shoulda-matchers'
gem 'byebug'

gem 'factory_girl_rails'
gem 'faker'
gem 'capybara'
gem 'launchy'
gem 'database_cleaner'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'

Expand Down
46 changes: 46 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,20 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.8)
arel (6.0.0)
bcrypt (3.1.10)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
byebug (4.0.5)
columnize (= 0.9.0)
capybara (2.4.4)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
Expand All @@ -50,9 +58,18 @@ GEM
execjs
coffee-script-source (1.9.1)
columnize (0.9.0)
database_cleaner (1.4.1)
debug_inspector (0.0.2)
diff-lcs (1.2.5)
erubis (2.7.0)
execjs (2.5.2)
factory_girl (4.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
faker (1.4.3)
i18n (~> 0.5)
globalid (0.3.5)
activesupport (>= 4.1.0)
hike (1.2.3)
Expand All @@ -65,6 +82,8 @@ GEM
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.2)
launchy (2.4.3)
addressable (~> 2.3)
loofah (2.0.1)
nokogiri (>= 1.5.9)
mail (2.6.3)
Expand Down Expand Up @@ -106,6 +125,21 @@ GEM
rake (10.4.2)
rdoc (4.2.0)
json (~> 1.4)
rspec-collection_matchers (1.1.2)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (2.99.2)
rspec-expectations (2.99.2)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.99.3)
rspec-rails (2.99.0)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-collection_matchers
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
rspec-mocks (~> 2.99.0)
sass (3.4.13)
sass-rails (5.0.3)
railties (>= 4.0.0, < 5.0)
Expand All @@ -116,6 +150,8 @@ GEM
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
shoulda-matchers (2.8.0)
activesupport (>= 3.0.0)
spring (1.3.4)
sprockets (2.12.3)
hike (~> 1.2)
Expand All @@ -141,19 +177,29 @@ GEM
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
xpath (2.0.0)
nokogiri (~> 1.3)

PLATFORMS
ruby

DEPENDENCIES
bcrypt (~> 3.1.7)
byebug
capybara
coffee-rails (~> 4.1.0)
database_cleaner
factory_girl_rails
faker
jbuilder (~> 2.0)
jquery-rails
launchy
pg
rails (= 4.2.1)
rspec-rails (~> 2.0)
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
shoulda-matchers
spring
turbolinks
uglifier (>= 1.3.0)
Expand Down
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2015 Kevin Alwell

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# StackOverflow
Binary file added app/.DS_Store
Binary file not shown.
Binary file added app/assets/images/stack_exchange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/stackoverflow_logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,33 @@
//= require jquery_ujs
//= require turbolinks
//= require_tree .
$(document).ready(function() {
$('#add_comm').click(function(event){
event.preventDefault();

$(this).hide();
console.log(this)
var url = $(this).attr('href');

$.get(url, function(serverResponse, status, request){
console.log(serverResponse)
$('#comments').append(serverResponse);
});
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this is not used? In any case, in general, it's better ux to show / hide / dynamically create forms with JS rather than get+partial (it's a good idea to avoid a network round-trip if we can.)


$('#comments').on('submit', '#new_comment', function(event){
event.preventDefault();

var url = $(this).attr('action');
var data = $(this).serialize();

$.post(url, data, function(serverResponse, status, request){
$('#comments').append(serverResponse);
});

$(this).parent('div').remove();

$('#add_com').show();
});

});
Loading