[ANN] Rails 4.2.4 and 4.1.13 have been released!

Hi everyone,

I am happy to announce that Rails 4.2.4 and 4.1.13 have been released.

No regressions were found so these releases include the same changes that the release candidates.

CHANGES since 4.1.12

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

CHANGES since 4.2.3

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

SHA-1

If you'd like to verify that your gem is the same as the one I've uploaded, please use these SHA-1 hashes.

Here are the checksums for 4.1.13:

$ shasum *4.1.13*
7c637fed154a152451adb8ef1ebae136e0502ebd  actionmailer-4.1.13.gem
61303b7ee877aa06f16ce0ba6a7cce21ca031f42  actionpack-4.1.13.gem
39c5a4a290a5969402bf5c4ac61b99e5dcb40c3c  actionview-4.1.13.gem
6d88159aa15ea48f9118ece97ec549807a504f55  activemodel-4.1.13.gem
1107470b19cc0d6608d431678c78d3871c8df229  activerecord-4.1.13.gem
f79bdfa0105c1a833069d989291ec9d23bc84d92  activesupport-4.1.13.gem
6391b4a323e0b30118ffdbad6bb5f68459920d7b  rails-4.1.13.gem
fc64a4f89a3fa8f9ab2a9edd37d7338a79cb9859  railties-4.1.13.gem

Here are the checksums for 4.2.4:

$ shasum *4.2.4*
a866394bb4682afaa6d54458b1f3be0dca5e862e  actionmailer-4.2.4.gem
b625e58fb8fa11185ff81630f3bef5c517e294e4  actionpack-4.2.4.gem
334ddc60724e4e1ff99e2170d2e435805d0ade0b  actionview-4.2.4.gem
7bd46253f17bcff5c8ae3ba0f0938c38b0ca1e2f  activejob-4.2.4.gem
d361d1e0eac7851103ac2de4c9359a556c724ab9  activemodel-4.2.4.gem
d9faecb759827fc7944558463388efbbd9f20005  activerecord-4.2.4.gem
ab4283126725e3aa9c248e2e2119548ad205732d  activesupport-4.2.4.gem
67d7a12105f5389dd7b511eff5f56c6c048175d8  rails-4.2.4.gem
8e9eab180dbd97eaf7626601c55e61ea1ae68284  railties-4.2.4.gem

I'd like to thank you all, every contributor who helped with this release.

๐Ÿš‚ This week in Rails ๐Ÿš‚: Learn How These 37 Rails Contributors Improved The Entire Framework In Just One Week

Good News Everyone, This Week In Rails has been acquired by BuzzFeed!

Just kidding. This is Godfrey here. It's been a while since I get to write one of these myself and I'm very happy to be back. Without further ado, let's dive right into it!

โœจ Featured โœจ

โค๏ธ Code of Conduct

The Rails team is committed to fostering a welcoming community for everyone. With the help of our community, we have added an official Code of Conduct for the project this week.

๐Ÿ˜ฑ 37 Programmers Contributed To Rails And You Won't Believe What Happened Next

Well, their pull requests were merged and they are immortalized on the Rails Contributors website. And oh, everyone please send a warm welcome to the 10 first-time contributors this week!

๐Ÿ“ฆ Releases ๐Ÿ“ฆ

๐Ÿ“ข Sprockets Has Hit Version 3.3.3, What Does That Really Mean For The Rest Of Us?

According to @schneems who is responsible for the release, this is supposed to fix an issue for those of you "who share a cache in different directories between deploys", which includes Heroku deployments.

๐Ÿ’Ž New Stuff ๐Ÿ’Ž

๐Ÿ’พ MySQL Finally Gets A Native JSON Data Type โ€“ But Is It Too Late To Save California?

MySQL has recently added a native JSON data type (perhaps inspired by its more popular cousin, PostgreSQL). Thanks to this patch, you will be ready to take advantage of that feature in Rails 5.

๐Ÿ‘Œ Fixed ๐Ÿ‘Œ

๐ŸŽ‚ The One Weird Trick That Lets You Write To Files Atomically

Concurrency is hard, but Rails might have finally cracked the nut. You might not know that Active Support offers a way to write to a file atomically with File.atomic_write.

Even if you have heard about it, you probably didn't realize there is a subtle race condition in its implementation. Anyway, with this patch landing on master, those bugs will soon be behind us and we can all just sit back and enjoy the convenience it provides.

๐Ÿ‘ Improved ๐Ÿ‘

๐Ÿšจ Nobody Likes To Do Repeated Work โ€“ Here Is A Cache They Won't Tell You About

It turns out that things do not run twice as fast when you double-cache them. Who would have thought? (I wish we all wrote great commit messages like this by the way!)

โœ‚๏ธ Testing Is Important, But Has Rails Gone Too Far?

Along those same lines, it turns out that testing the same thing twice doesn't provide much value either.

๐Ÿ™ˆ Wrapping Up ๐Ÿ™ˆ

That's all for This week in Rails. As always, there are many more changes than we have room to cover here, but feel free to check them out yourself!

Have you been thinking about writing for us, but you're scared of putting yourself out there? Don't worry, you can help our editors improve their writing with thoughtful critique and general grammar policing.

You up for that? Tell Godfrey today.

This week in Rails: Rails 4.2.4 RC1, 4.1.13 RC1 and more!

Hello Everyone! This is Roque bringing the latest from Rails with some help from Kasper.

Featured

This Week's Rails Contributors

We had 36 awesome contributors to the Rails codebase this week. Check out the active issues over on GitHub if you'd like to see your name here.

Rails 4.2.4 RC1 and 4.1.13 RC1 have been released!

There's new release candidates, please try them and report any regressions you find, so that the Rails team can fix them before the final release.

Thank you to all contributors for these releases!

New Stuff

Active Record relations come in batches

This week Active Record got a new method that works like find_in_batches but yields relations instead of arrays. It also added a cool delegation API that lets you do something like:

People.in_batches.delete_all('age > 21')

Oh, in case you were wondering โ€“ this is pretty much how Skynet works.

Improved

i18n reloading picks up new and deleted files

This patch allows new locale YAML files to be loaded without having to restart the Rails server. It also reloads the available locales when files are deleted.

Active Job assertions returns matched job

The matched job returned by these methods can be used for advanced assertions like:

job = assert_enqueued_with(job: SomeJob) do
  some_business_logic
end
assert_equal 5, job.arguments.second

Spun Off

XML serialization have been moved to a gem

As usage for XML serialization declined, it's become less of a core concern of Rails. In Rails 5, this feature will be moved to the activemodel-serializers-xml gem.

If you're still using the XML Serialization feature in your app, you will need to add this to your Gemfile when you upgrade.

That's a wrap

That's all for This week in Rails. As always, there are many more changes than we have room to cover here, but feel free to check them out yourself!

Have you been thinking about writing for us, but you're scared of putting yourself out there? Don't worry, you can help our editors improve their writing with thoughtful critique and general grammar policing.

You up for that? Tell Godfrey today.

[ANN] Rails 4.2.4.rc1 and 4.1.13.rc1 have been released!

Hi everyone,

I am happy to announce that Rails 4.2.4.rc1 and 4.1.13.rc1 have been released.

If no regressions are found expect the final release this Wednesday, on August 19, 2015. If you find one, please open an issue on GitHub and mention me (@rafaelfranca) on it, so that we can fix it before the final release.

CHANGES since 4.1.12

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

CHANGES since 4.2.3

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

SHA-1

If you'd like to verify that your gem is the same as the one I've uploaded, please use these SHA-1 hashes.

Here are the checksums for 4.1.13.rc1:

$ shasum *4.1.13.rc1*
284f1eb3a000d54f07435e0b19e88f1ba80f738b  actionmailer-4.1.13.rc1.gem
352ad673a18efe226ed3e1b1eb7e61818ccae1a2  actionpack-4.1.13.rc1.gem
f7e147aa4377149a7516bf23fa5892979a7ff77f  actionview-4.1.13.rc1.gem
70da96abb737ef31eba8e1b57fa2cb122110bb59  activemodel-4.1.13.rc1.gem
c571e1092a3982517d353ff85fab2c5e9b3c28cc  activerecord-4.1.13.rc1.gem
19e9f8f248261d6b605c62eca071e29e9c7e5a90  activesupport-4.1.13.rc1.gem
7c418986f10ff82fbb1be1b3a6c9defb80aac5eb  rails-4.1.13.rc1.gem
e5ca51e2cb32fa57bd7ba18f8fe52cd3c0e2bbb9  railties-4.1.13.rc1.gem

Here are the checksums for 4.2.4.rc1:

$ shasum *4.2.4.rc1*
7f343fd97d1e41920feac65020fa487c4d0be67e  actionmailer-4.2.4.rc1.gem
f815f40569f0e6b93f10c61d696d9ab06aba6531  actionpack-4.2.4.rc1.gem
bca83efa6384b88b5429f1dad1dd1a05e7c8e491  actionview-4.2.4.rc1.gem
7d8694143e23712da67606ea78919ed71605dd19  activejob-4.2.4.rc1.gem
674d0fd053f8365a1be9fe787f6fe10c5b9b3993  activemodel-4.2.4.rc1.gem
ec34623a19a136dcb62308ad3dfeba3209a5beac  activerecord-4.2.4.rc1.gem
8673028f02630357ea1f086323468b4a733b00aa  activesupport-4.2.4.rc1.gem
970ee741e3e2ffcaae6cbb33895ee2dc407bb5a3  rails-4.2.4.rc1.gem
69f16c95fac8739bc62e5f2cbe352bfa05746223  railties-4.2.4.rc1.gem

I'd like to thank you all, every contributor who helped with this release.

This week in Rails: caching madness, Active Job improvements, and even more performance!

What's up, gang? Todd here with another edition of This Week in Rails. It was a bit of a quiet week in Railsland, but I think we've got some quality contributions here. Read on for the deets!

Featured

This Week's Rails Contributors

We had 39 awesome contributors to the Rails codebase this week. Check out the active issues over on GitHub if you'd like to see your name here.

New Stuff

Add #cache_key to ActiveRecord::Relation

This addition bakes a strategy for generating collection cache keys directly into ActiveRecord::Relation. Using #cache_key, it's now possible to automagically generate a unique key on relations for use with Rails' fragment cache.

Development Server Caching Toggle

Per a request from DHH, this change adds the ability to enable or disable caching in a development environment. There are two ways to toggle it - on server start with --[no-]dev-caching or with the dev:cache rake task.

Improved

Active Job and Locales

Active Jobs queued with #perform_later previously wouldn't honor the context's locale. This patch rectifies that by storing it on the job directly.

Even More Performance Improvements!

By using #start_with? instead of matching on a regex, 765.5 ms have been shaved off of the total aggregate request time per 1000 requests. In conjunction with other performance work recently completed, this knocks a whopping 1.5 seconds off over the course of 1000 requests.

That's a wrap

That's all for This week in Rails. As always, there are many more changes than we have room to cover here, but feel free to check them out yourself!

Have you been thinking about writing for us, but you're scared of putting yourself out there? Don't worry, you can help our editors improve their writing with thoughtful critique and general grammar policing.

You up for that? Tell Godfrey today.

This week in Rails: wildcard template dependencies and more performance!

Happy Friday Everyone!

This is Greg with the latest news about Rails. We had a quiet week so this issue will be a short one.

Featured

This week's Rails contributors

This week 23 awesome people helped to make Rails even better. If you are interested in becoming a contributor, you can have a look at the issues list.

New Stuff

Wildcard template dependencies

You can define your template dependencies with a wildcard and do more with less code!

Plugin generator for API applications

This pull requests adds an --api option in order to generate plugins that can be added inside API applications.

Improved

Performance improvements

By reducing the number of object allocations, this giant patch helps reduce memory usage and also brings you some significant speed improvement (as a benchmark, codetriage.com ran about 10% faster).

Fixed

Uniqueness validator fix

This commit fixes an issue when using the uniqueness validator against a custom primary key.

That's a wrap

That's all for This week in Rails. As always, there are many more changes than we have room to cover here, but feel free to check them out yourself!

Have you been thinking about writing for us, but you're scared of putting yourself out there? Don't worry, you can help our editors improve their writing with thoughtful critique and general grammar policing.

You up for that? Tell Godfrey today.

This week in Rails: goodbye Rack::Lock, concurrent-ruby, better AC::Parameters and more

Hello Everyone!

This is Vipul from Pune, waiting to enjoy some sweet Sheer khurma, and delicious Biryani with my friends, since Eid is just around the corner.

Hmm, Yum.

Featured

This week's Rails contributors

This week 28 people helped make Rails even more awesome than before. Big thank you to all these amazing people! If you'd like to chip in, there's always something you could help work on!

New Stuff

Remove Rack::Lock

This is one of the many concurrency-related work that went into Rails this week.

Instead of forcing Rack::Lock when eager_load and cache_classes are off, this change just prevents actual race conditions.

It is achieved by means of a (reentrant) shared-exclusive lock. This allows multiple concurrent requests but ensures any code-loading activity gets performed in isolation.

Improved

Replace ActiveSupport::Concurrency::Latch with Concurrent::CountDownLatch from concurrent-ruby

ActiveSupport::Concurrency::Latch was replaced with Concurrent::CountDownLatch from the concurrent-ruby gem.

This replaces concurrency related code cluttered in AS and offloads it to concurrent-ruby gem, which has many concurrency utilities with runtime-specific optimizations.

Deprecate force association reload by passing true

This is to simplify the association API, as we can call reload on the association proxy or the parent object to get the same result.

So now to reload one would call @user.posts.reload instead of @user.posts(true) for collections and @user.reload.profile instead of @user.profile(true) for singular associations.

See also this mailing list thread for more background information.

Fixed

Test runner now works correctly inside Engines

The bin/rails test has now been extended to work properly instead engines, where previously we needed to do rake test.

ActionController::Parameters no longer inherits from HashWithIndifferentAccess

Inheriting from HashWithIndifferentAccess allowed users to call any enumerable methods on Parameters object, resulting in a risk of losing the permitted? status or even getting back a pure Hash object instead of a Parameters object with proper sanitization.

This change fixes this behavior and makes sure all the methods defined on Parameters will return a Parameters object with the correct permitted? flag.

That's a wrap

That's all for This week in Rails. As always, there are many more changes than we have room to cover here, but feel free to check them out yourself!

Have you been thinking about writing for us, but you're scared of putting yourself out there? Don't worry, you can help our editors improve their writing with thoughtful critique and general grammar policing.

You up for that? Tell Godfrey today.

This week in Rails: Action Cable, collection caching and more

Hi This is Prathamesh bringing together all the latest happenings from the Rails world.

Featured

Action Cable alpha is out!

Action Cable is out in wild as promised by DHH in his Railsconf keynote. There is flurry of activity happening with it right now. It's still in alpha mode and will get production ready with Rails 5.

This week's Rails contributors

Meet the 21 lovely people who contributed to Rails this week, the community can't thank you all enough!

New Stuff

Explicit collection caching directive

Now we can explicitly specify collection caching using a special directive # Template Collection. The partials which do not start with <% cache do %> calls will get benefitted by this feature.

Improved

Filter params based on parent keys

Do you have nested params with same child key and different parent keys? Do you want to filter the child keys for only some of the parent keys? Now you can! Params can be filtered based on parent key using a simple config.

Fixed

Fix inconsistent behavior of HWIA with default_proc

Thanks to this fix, behavior of HWIA is now in sync with Ruby's built-in Hash when a default_proc is set on the instance and it is duped.

That's a wrap

That's all for This week in Rails. As always, there are many more changes than we have room to cover here, but feel free to check them out yourself!

Have you been thinking about writing for us, but you're scared of putting yourself out there? Don't worry, you can help our editors improve their writing with thoughtful critique and general grammar policing.

You up for that? Tell Godfrey today.

This week in Rails: SQL colors, reversible column defaults and more!

Hello? This is your captain Kasper speaking.

We're just about ready to take to the skies for our weekly cruise through the news. I took a flight course once, and walked away from the crash in flying colors. If my instructor had made it out, I'm sure he would be proud too.

Look at us, we're already taking off - hey, is that light supposed to be blinking?

Featured

This Week's Rails Contributors

26 daring pilots brimmed the horizon with their commits this week. There were loops and barrel rolls galore - you should have been there! Oh, but you can. See the last item if you feel the need for speed (and contributing).

When SQL Output met Rainbows

In Rails 5 you'll see your SQL has gotten a fresh coat of paint - several in fact. Now common SQL statements appear in color when sprouting up in your logs. Check the link for the color map.

change\_column\_default Gains Reversible Syntax

Gone are the thrills of remembering past defaults, when you changed it for a column. Both from and to can be passed now: change_column_default(:posts, :state, from: nil, to: "draft")

If all your life's ROFLMAO'ing have left you with ass left to laugh off, you'll be ready to migrate and roll back on the floor laughing the remainder of your rear right off over this.

Improved

Windows Users Needs the Latest Development Kit

If you're a Windows user and witness to the horror of rails new failing with native gems not being able to be installed - rejoice! You need the latest Development Kit version, which our getting started guide will now tell you.

Fixed

where with Association Names are Closer to 4.2

To prevent ambiguity and potential collisions, association names in where are assumed to reference the table name.

default\_render Can Yield When Template is Missing

When a Rails 5 controller action have no corresponding template, Rails renders head :no_content. Before libraries were hooking into the missing template exception being thrown. Now default_render takes a block and the hook is back.

One More Thingโ„ข

Feel the need to contribute?

From time to time DHH opens issues on Rails about stuff he'd like implemented. As long as someone hasn't laid claim to it in the comments (or is assigned) it's yours to take a stab at.

That's a wrap

That's all for This week in Rails. As always, there are many more changes than we have room to cover here, but feel free to check them out yourself!

Have you been thinking about writing for us, but you're scared of putting yourself out there? Don't worry, you can help our editors improve their writing with thoughtful critique and general grammar policing.

You up for that? Tell Godfrey today.

This week in Rails: Rails 4.2.3, Rails 4.1.12 and more!

Hey there!

This is Claudio, celebrating a historical moment on the road to a better framework for everyone.

Featured

This week's Rails contributors

28 people contributed to the framework by having their commits merged into rails/rails this week. Thanks and keep up the good work!

Rails 4.2.3 and 4.1.12 have been released!

What are you waiting for? Run bundle update rails and get four months of updates in your codebases!

New Stuff

Integrate protected_attributes with strong parameters

Are you still on Rails 3? Do you wish you could use strong parameters? Check out this commit to protected_attributesโ€ฆ it might just make your day.

Sprockets 4.0 is coming

The development of rails/sprockets moves on andโ€ฆ needs your help! If you'd like to contribute to its next version, don't hesitate to contact any Rails core team member.

Fixed

Raise the proper error on namespaced-association type mismatch

Assigning a wrong value to a namespaced association used to raise NameError, but will now correctly raise ActiveRecord::AssociationTypeMismatch

One More Thingโ„ข

Kasper Timm Hansen is a Rails Committer team member

Kasper started contributing one year ago and has not stopped (240 commits and counting)! Thanks for being awesome and for your wonderful blog posts.

That's a wrap

That's all for This week in Rails. As always, there are many more changes than we have room to cover here, but feel free to check them out yourself!

Have you been thinking about writing for us, but you're scared of putting yourself out there? Don't worry, you can help our editors improve their writing with thoughtful critique and general grammar policing.

You up for that? Tell Godfrey today.