File tree 4 files changed +11
-2
lines changed
4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ gem 'simple_form'
8
8
gem "paperclip" , "~> 3.0"
9
9
gem 'aws-sdk'
10
10
gem 'faker'
11
+ gem 'will_paginate'
12
+ gem 'bootstrap-will_paginate'
11
13
12
14
group :production do
13
15
gem 'pg'
Original file line number Diff line number Diff line change 37
37
bcrypt-ruby (3.1.2 )
38
38
bootstrap-sass (2.2.2.0 )
39
39
sass (~> 3.2 )
40
+ bootstrap-will_paginate (0.0.10 )
41
+ will_paginate
40
42
builder (3.0.4 )
41
43
climate_control (0.0.3 )
42
44
activesupport (>= 3.0 )
@@ -134,13 +136,15 @@ GEM
134
136
uuidtools (2.1.4 )
135
137
warden (1.2.3 )
136
138
rack (>= 1.0 )
139
+ will_paginate (3.0.4 )
137
140
138
141
PLATFORMS
139
142
ruby
140
143
141
144
DEPENDENCIES
142
145
aws-sdk
143
146
bootstrap-sass (~> 2.2.2.0 )
147
+ bootstrap-will_paginate
144
148
coffee-rails (~> 3.2.1 )
145
149
devise
146
150
faker
@@ -152,3 +156,4 @@ DEPENDENCIES
152
156
simple_form
153
157
sqlite3
154
158
uglifier (>= 1.0.3 )
159
+ will_paginate
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ class PinsController < ApplicationController
4
4
# GET /pins
5
5
# GET /pins.json
6
6
def index
7
- @pins = Pin . order ( "created_at desc" )
7
+ @pins = Pin . order ( "created_at desc" ) . page ( params [ :page ] ) . per_page ( 20 )
8
8
9
9
respond_to do |format |
10
10
format . html # index.html.erb
Original file line number Diff line number Diff line change 2
2
3
3
<div id ="pins ">
4
4
<%= render @pins %>
5
- </ div >
5
+ </ div >
6
+
7
+ <%= will_paginate @pins %>
You can’t perform that action at this time.
0 commit comments