rails 5: awesome features and breaking changes

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

Upload: -

Post on 15-Apr-2017

170 views

Category:

Data & Analytics


2 download

TRANSCRIPT

Page 1: Rails 5: awesome features and breaking changes

Rails 5: awesome features and breaking changes

claudiob.github.io

Page 2: Rails 5: awesome features and breaking changes

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

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

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

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

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

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

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

Releasing a major version

≈ Moving to a new place

pack

grow

housewarm

decorate

unpack

clean

Page 10: Rails 5: awesome features and breaking changes

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

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

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

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

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

pack

grow

housewarm

decorate

unpack

clean

Rails API!

ActionCable!

New Turbolinks!

New Sprockets!

Exciting future!

Thanks! 🎀