The Complete Guide to Rails Shims

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.
The Complete Guide to Rails Shims #ruby #rubydeveloper #rubyonrails #guide https://rubyonrails.ba/single/the-complete-guide-to-rails-shims

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles