Slide 1

Slide 1 text

Rails 5: awesome features and breaking changes claudiob.github.io

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

Rails 1.x Rails 5.x Rails 4.x Rails 3.x Rails 2.x Rails 0.x

Slide 4

Slide 4 text

Rails 1.x Rails 5.x Rails 4.x Rails 3.x Rails 2.x Rails 0.x

Slide 5

Slide 5 text

Rails 1.x Rails 5.x Rails 4.x Rails 3.x Rails 2.x Rails 0.x

Slide 6

Slide 6 text

Rails 1.x Rails 5.x Rails 4.x Rails 3.x Rails 2.x Rails 0.x

Slide 7

Slide 7 text

Rails 1.x Rails 5.x Rails 4.x Rails 3.x Rails 2.x Rails 0.x

Slide 8

Slide 8 text

Rails 1.x Rails 5.x Rails 4.x Rails 3.x Rails 2.x Rails 0.x

Slide 9

Slide 9 text

Releasing a major version ≈ Moving to a new place pack grow housewarm decorate unpack clean

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

pack grow housewarm decorate unpack clean Rails API! ActionCable! New Turbolinks! New Sprockets! Exciting future! Thanks!