Skip to content

Commit 2e6b5b4

Browse files
committed
Voting system json, identation, fix gitignore
1 parent 64f5013 commit 2e6b5b4

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# git config --global core.excludesfile '~/.gitignore_global'
66

77
# Ignore bundler config.
8-
/.bundle
9-
/.vendor
8+
.bundle
9+
.vendor/cache
1010

1111
# Ignore the default SQLite database.
1212
/db/*.sqlite3

app/views/api/v1/pizzas/index.json.jbuilder

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ json.array! @pizzas do |piza|
22
json.id piza.id
33
json.name pizza.name
44
json.ingredients pizza.ingredients
5+
json.votes.count pizza.votes.count
56
end
67

7-
8-

config/routes.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
namespace 'api' do
44
namespace 'v1' do
55
resources :pizzas
6-
7-
post 'upvote'
8-
6+
post 'upvote'
97
end
108
end
119
end

0 commit comments

Comments
 (0)