rails 5: awesome features and breaking changes
TRANSCRIPT
![Page 1: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/1.jpg)
Rails 5: awesome features and breaking changes
claudiob.github.io
![Page 2: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/2.jpg)
Rails 1.x
Rails 5.x
Rails 4.x
Rails 3.x
Rails 2.x
Rails 0.x
Releasing a major version
≈ Moving to a new place
![Page 3: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/3.jpg)
Rails 1.x
Rails 5.x
Rails 4.x
Rails 3.x
Rails 2.x
Rails 0.x
![Page 4: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/4.jpg)
Rails 1.x
Rails 5.x
Rails 4.x
Rails 3.x
Rails 2.x
Rails 0.x
![Page 5: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/5.jpg)
Rails 1.x
Rails 5.x
Rails 4.x
Rails 3.x
Rails 2.x
Rails 0.x
![Page 6: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/6.jpg)
Rails 1.x
Rails 5.x
Rails 4.x
Rails 3.x
Rails 2.x
Rails 0.x
![Page 7: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/7.jpg)
Rails 1.x
Rails 5.x
Rails 4.x
Rails 3.x
Rails 2.x
Rails 0.x
![Page 8: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/8.jpg)
Rails 1.x
Rails 5.x
Rails 4.x
Rails 3.x
Rails 2.x
Rails 0.x
![Page 9: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/9.jpg)
Releasing a major version
≈ Moving to a new place
pack
grow
housewarm
decorate
unpack
clean
![Page 10: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/10.jpg)
pack
grow
housewarm
decorate
unpack
clean
Remove deprecation code
Remove respond_to/respond_with placeholder methods
Remove XML Serialization
Remove content_tag_for, div_for
Remove skip_action_callback
Remove rake doc:* tasks
Remove render nothing: true
Remove from ActionController *_filter callbacks (use *_action)
#18325
afd5e9a
#21161
#18411
#19060
cd7cc52
#20336
7644a99
![Page 11: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/11.jpg)
pack
grow
housewarm
decorate
unpack
clean
Require Ruby 2.2.2
Beyond Ludicrous Speed
AS::Dependencies 10x faster
Use #start_with? and #[] for speed
Reference string constants
Use keyword arguments
Replace alias_method_chain with Module#prepend
#19753
#21057
#21411
#21100
#18323
#17173
#19434
![Page 12: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/12.jpg)
pack
grow
housewarm
decorate
unpack
clean
More uniform arguments for ActiveRecord::Relation methods
Drop ActiveRecord::Relation#uniq
Allow empty arrays in deep munge
Require belongs_to by default
Allow true to validate acceptance
More reversible migration actions
Accept collections in fresh_when
Type ‘rails command’, not ‘rake’
_🍔.html.erb is a valid partial file
#11898
#16924
#18937
#18439
#18374
#18878
#21505
#20198
#20018
da9038e
![Page 13: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/13.jpg)
pack
grow
housewarm
decorate
unpack
clean
Add ActiveRecord::Relation#or
Add ActiveModel::Errors#codes
Add Integer#positive?, negative?
Add prev_weekday, next_weekday, weekend? to Date and DateTime
Add Method#source_code
Add forever-cache for static pages
Add AR::Base.has_secure_token
Add ActionController::Renderer
Add ‘rake dev:cache’
#16052
e54277a
#18335
#18473
#18217
#18546
#18322
#18394
#20961
![Page 14: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/14.jpg)
pack
grow
housewarm
decorate
unpack
clean
Returning false in callbacks no longer halts callback chains
ActionController::Parameters no longer inherits from HashWithIndifferentAccess
PredicateBuilder no longer accepts Class in conditions
Time columns are now time-zone aware by default
#17227
#20868
#17916
#15726
![Page 15: Rails 5: awesome features and breaking changes](https://reader031.vdocuments.us/reader031/viewer/2022030316/58780df61a28ab971e8b65f9/html5/thumbnails/15.jpg)
pack
grow
housewarm
decorate
unpack
clean
Rails API!
ActionCable!
New Turbolinks!
New Sprockets!
Exciting future!
Thanks! 🎀