Friday, February 12, 2016

Ruby on Rails, with love since 2005

Posted by claudiob

####

Happy Valentine’s Day weekend!

What better way to show your love for Rails than to help close the last few issues pending for the release candidate of Rails 5? ☺️

Claudio

This week’s contributors

Thanks to the 41 people who loved Rails this week by contributing to its source code. A special kiss to the 14 of you who contributed for the first time!

Guides: Using Rails for API-only Applications

You heard that Rails 5 will be able to generate API-only applications. Now you can learn all the details by reading this new chapter added to the Rails Guides.

The source code of turbolinks has been moved to a new GitHub organization, with plans to release more turbolinks-related libraries in the future.

New Stuff

Added numeric helper into SchemaStatements

Need to add a numeric column to a database table? You can now use t.numeric :foo which is a lovely alias of t.decimal :foo.

Add as to encode a request as a specific mime type

You can now test a JSON POST request with post articles_path, as: :json rather than adding helpers like post_json. And you can also test the response as parsed JSON with parsed_body.

Fixed

Fix performance regression in Active Record

RubyBench analyzes every commit made to rails/rails so performance regressions can be rapidly discovered… and fixed!

Improved

Speed up string xor operation and reduce object allocations

We love commits like this one which improve the performance of Rails and use benchmark/ips to measure their impact.

Set database poolsize via RAILS_MAX_THREADS

The environment variable introduced in config/puma.rb is now reused in the database configuration to avoid connection timeout errors.

Wrapping Up

That’s all for This week in Rails. As always, there are plenty of things we’re not able to cover here, so take a peek at the changes yourself.

Until next time!