Version 4.2, due this month, will feature debugging, HTML, and jobs framework improvements. The upgrade, which moved to a release candidate stage late last week, also sets the stage for Rails 5.0, the next major release of the 10-year-old framework. "The release of the first RC for the 4.2.0 series also marks the beginning of Rails 5 development," the Rails blog said, though Rails creator David Heinemeier Hansson stated in an email that version 5.0 will not likely appear before next fall.
"New applications generated with Rails 4.2 now come with the Web Console gem by default," Rails 4.2 release notes state. "Web Console adds an interactive Ruby console on every error page and provides a console view and controller helpers."
The Active Job framework in version 4.2, meanwhile, serves as a common interface on top of queuing systems like Resque, Sidekiq, and Delayed Job. "Jobs written with the Active Job API run on any of the supported queues thanks to their respective adapters. Active Job comes pre-configured with an inline runner that executes jobs right away."
Version 4.2 will also provide a performance boost via Adequate Record, a set of upgrades to Active Record that can double the speed of some queries. Adequate Record works by caching common SQL queries as prepared statements and reusing them on similar calls. Active Record, serving as the "model" in the Rails MVC paradigm, enables development of business objects, with data requiring persistent storage in a database.
Finally, "the HTML sanitizer has been replaced with a new, more robust, implementation built upon Loofah and Nokogiri," according to release notes. "The new sanitizer is more secure and its sanitization is more powerful and flexible."
This story, "Faster Ruby on Rails Rolls into the Station" was originally published by InfoWorld.