Skip to content

Commit 91f503e

Browse files
author
TruongNM
committed
Update Ruby 2.5.3 Rails 5.2.1, fix post controller with new ROR version
1 parent 981d679 commit 91f503e

File tree

3 files changed

+65
-53
lines changed

3 files changed

+65
-53
lines changed

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ git_source(:github) do |repo_name|
55
"https://github.com/#{repo_name}.git"
66
end
77

8+
ruby '2.5.3'
89

910
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
10-
gem 'rails', '~> 5.1.4'
11+
gem 'rails', '~> 5.2.1'
1112
# Use sqlite3 as the database for Active Record
1213
gem 'sqlite3'
1314
# Use Puma as the app server

Gemfile.lock

Lines changed: 62 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,50 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (5.1.6)
5-
actionpack (= 5.1.6)
4+
actioncable (5.2.1)
5+
actionpack (= 5.2.1)
66
nio4r (~> 2.0)
7-
websocket-driver (~> 0.6.1)
8-
actionmailer (5.1.6)
9-
actionpack (= 5.1.6)
10-
actionview (= 5.1.6)
11-
activejob (= 5.1.6)
7+
websocket-driver (>= 0.6.1)
8+
actionmailer (5.2.1)
9+
actionpack (= 5.2.1)
10+
actionview (= 5.2.1)
11+
activejob (= 5.2.1)
1212
mail (~> 2.5, >= 2.5.4)
1313
rails-dom-testing (~> 2.0)
14-
actionpack (5.1.6)
15-
actionview (= 5.1.6)
16-
activesupport (= 5.1.6)
14+
actionpack (5.2.1)
15+
actionview (= 5.2.1)
16+
activesupport (= 5.2.1)
1717
rack (~> 2.0)
1818
rack-test (>= 0.6.3)
1919
rails-dom-testing (~> 2.0)
2020
rails-html-sanitizer (~> 1.0, >= 1.0.2)
21-
actionview (5.1.6)
22-
activesupport (= 5.1.6)
21+
actionview (5.2.1)
22+
activesupport (= 5.2.1)
2323
builder (~> 3.1)
2424
erubi (~> 1.4)
2525
rails-dom-testing (~> 2.0)
2626
rails-html-sanitizer (~> 1.0, >= 1.0.3)
27-
activejob (5.1.6)
28-
activesupport (= 5.1.6)
27+
activejob (5.2.1)
28+
activesupport (= 5.2.1)
2929
globalid (>= 0.3.6)
30-
activemodel (5.1.6)
31-
activesupport (= 5.1.6)
32-
activerecord (5.1.6)
33-
activemodel (= 5.1.6)
34-
activesupport (= 5.1.6)
35-
arel (~> 8.0)
36-
activesupport (5.1.6)
30+
activemodel (5.2.1)
31+
activesupport (= 5.2.1)
32+
activerecord (5.2.1)
33+
activemodel (= 5.2.1)
34+
activesupport (= 5.2.1)
35+
arel (>= 9.0)
36+
activestorage (5.2.1)
37+
actionpack (= 5.2.1)
38+
activerecord (= 5.2.1)
39+
marcel (~> 0.3.1)
40+
activesupport (5.2.1)
3741
concurrent-ruby (~> 1.0, >= 1.0.2)
3842
i18n (>= 0.7, < 2)
3943
minitest (~> 5.1)
4044
tzinfo (~> 1.1)
4145
addressable (2.5.2)
4246
public_suffix (>= 2.0.2, < 4.0)
43-
arel (8.0.0)
47+
arel (9.0.0)
4448
autoprefixer-rails (8.3.0)
4549
execjs
4650
aws_cf_signer (0.1.3)
@@ -75,7 +79,7 @@ GEM
7579
coffee-script-source
7680
execjs
7781
coffee-script-source (1.12.2)
78-
concurrent-ruby (1.0.5)
82+
concurrent-ruby (1.1.3)
7983
crass (1.0.4)
8084
devise (4.4.3)
8185
bcrypt (~> 3.0)
@@ -97,7 +101,7 @@ GEM
97101
hashie (3.5.7)
98102
http-cookie (1.0.3)
99103
domain_name (~> 0.5)
100-
i18n (1.0.1)
104+
i18n (1.1.1)
101105
concurrent-ruby (~> 1.0)
102106
jbuilder (2.7.0)
103107
activesupport (>= 4.2.0)
@@ -110,22 +114,25 @@ GEM
110114
rb-fsevent (~> 0.9, >= 0.9.4)
111115
rb-inotify (~> 0.9, >= 0.9.7)
112116
ruby_dep (~> 1.2)
113-
loofah (2.2.2)
117+
loofah (2.2.3)
114118
crass (~> 1.0.2)
115119
nokogiri (>= 1.5.9)
116-
mail (2.7.0)
120+
mail (2.7.1)
117121
mini_mime (>= 0.1.1)
118-
method_source (0.9.0)
122+
marcel (0.3.3)
123+
mimemagic (~> 0.3.2)
124+
method_source (0.9.2)
119125
mime-types (3.1)
120126
mime-types-data (~> 3.2015)
121127
mime-types-data (3.2016.0521)
122-
mini_mime (1.0.0)
128+
mimemagic (0.3.2)
129+
mini_mime (1.0.1)
123130
mini_portile2 (2.3.0)
124131
minitest (5.11.3)
125132
multi_json (1.13.1)
126133
netrc (0.11.0)
127-
nio4r (2.3.0)
128-
nokogiri (1.8.2)
134+
nio4r (2.3.1)
135+
nokogiri (1.8.5)
129136
mini_portile2 (~> 2.3.0)
130137
oauth (0.5.4)
131138
omniauth (1.8.1)
@@ -141,32 +148,33 @@ GEM
141148
popper_js (1.12.9)
142149
public_suffix (3.0.2)
143150
puma (3.11.4)
144-
rack (2.0.4)
145-
rack-test (1.0.0)
151+
rack (2.0.6)
152+
rack-test (1.1.0)
146153
rack (>= 1.0, < 3)
147-
rails (5.1.6)
148-
actioncable (= 5.1.6)
149-
actionmailer (= 5.1.6)
150-
actionpack (= 5.1.6)
151-
actionview (= 5.1.6)
152-
activejob (= 5.1.6)
153-
activemodel (= 5.1.6)
154-
activerecord (= 5.1.6)
155-
activesupport (= 5.1.6)
154+
rails (5.2.1)
155+
actioncable (= 5.2.1)
156+
actionmailer (= 5.2.1)
157+
actionpack (= 5.2.1)
158+
actionview (= 5.2.1)
159+
activejob (= 5.2.1)
160+
activemodel (= 5.2.1)
161+
activerecord (= 5.2.1)
162+
activestorage (= 5.2.1)
163+
activesupport (= 5.2.1)
156164
bundler (>= 1.3.0)
157-
railties (= 5.1.6)
165+
railties (= 5.2.1)
158166
sprockets-rails (>= 2.0.0)
159167
rails-dom-testing (2.0.3)
160168
activesupport (>= 4.2.0)
161169
nokogiri (>= 1.6)
162170
rails-html-sanitizer (1.0.4)
163171
loofah (~> 2.2, >= 2.2.2)
164-
railties (5.1.6)
165-
actionpack (= 5.1.6)
166-
activesupport (= 5.1.6)
172+
railties (5.2.1)
173+
actionpack (= 5.2.1)
174+
activesupport (= 5.2.1)
167175
method_source
168176
rake (>= 0.8.7)
169-
thor (>= 0.18.1, < 2.0)
177+
thor (>= 0.19.0, < 2.0)
170178
rake (12.3.1)
171179
rb-fsevent (0.10.3)
172180
rb-inotify (0.9.10)
@@ -199,15 +207,15 @@ GEM
199207
spring-watcher-listen (2.0.1)
200208
listen (>= 2.7, < 4.0)
201209
spring (>= 1.2, < 3.0)
202-
sprockets (3.7.1)
210+
sprockets (3.7.2)
203211
concurrent-ruby (~> 1.0)
204212
rack (> 1, < 3)
205213
sprockets-rails (3.2.1)
206214
actionpack (>= 4.0)
207215
activesupport (>= 4.0)
208216
sprockets (>= 3.0.0)
209217
sqlite3 (1.3.13)
210-
thor (0.20.0)
218+
thor (0.20.3)
211219
thread_safe (0.3.6)
212220
tilt (2.0.8)
213221
toastr-rails (1.0.3)
@@ -229,7 +237,7 @@ GEM
229237
activemodel (>= 5.0)
230238
bindex (>= 0.4.0)
231239
railties (>= 5.0)
232-
websocket-driver (0.6.5)
240+
websocket-driver (0.7.0)
233241
websocket-extensions (>= 0.1.0)
234242
websocket-extensions (0.1.3)
235243
will_paginate (3.1.6)
@@ -257,7 +265,7 @@ DEPENDENCIES
257265
omniauth (~> 1.6)
258266
omniauth-twitter
259267
puma (~> 3.7)
260-
rails (~> 5.1.4)
268+
rails (~> 5.2.1)
261269
sass-rails (~> 5.0)
262270
selenium-webdriver
263271
spring
@@ -270,5 +278,8 @@ DEPENDENCIES
270278
web-console (>= 3.3.0)
271279
will_paginate-bootstrap4
272280

281+
RUBY VERSION
282+
ruby 2.5.3p105
283+
273284
BUNDLED WITH
274-
1.16.2
285+
1.17.1

app/controllers/posts_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def create
1313
if @post.save
1414
if params[:images]
1515
params[:images].each do |img|
16-
@post.photos.create(image: params[:images][img])
16+
@post.photos.create(image: img[1])
1717
end
1818
end
1919

0 commit comments

Comments
 (0)