The Complete Guide to Rails Shims

05-Nov-2020 1265
When upgrading a Rails application, you might find that sometimes functionality is extracted from Rails and moved into a new gem. These gems are called shims, and they will basically allow you to keep using an old functionality, once the core API takes that out. You can also find shims in form of monkey patches. In this case it's functionality that you develop to make your migration easier.In this article I will list some of the functionality of past versions of Rails that was extracted into gems.Rails 5.0RECORD_TAG_HELPER (SEE CHANGES)content_tag_for and div_for were removed in favor of just using content_tag. To continue using the older methods, add the record_tag_helper gem to your Gemfile.RAILS-CONTROLLER-TESTING (SEE CHANGES)assigns and assert_template were extracted to the rails-controller-testing gem. To continue using these methods, you will need this gem in your Gemfile.ACTIVEMODEL-SERIALIZERS-XML (SEE CHANGES)ActiveModel::Serializers::Xml was extracted from Rails to the activemodel-serializers-xml gem. To continue using XML serialization, add gem activemodel-serializers-xml to your Gemfile.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle