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.

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!

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.

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.

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.

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?

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.

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.

[ANN] Rails 4.2.3 and 4.1.12 have been released!

Hi everyone,

I am happy to announce that Rails 4.2.3 and 4.1.12 have been released.

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

CHANGES since 4.1.11

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.2

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.12:

$ shasum *4.1.12*
c4f8aebcd59011e47d373a99413dad210e3d4bbd  actionmailer-4.1.12.gem
ce8868972769ad56b93b7b98585d64804d6d8174  actionpack-4.1.12.gem
2d6e6c6212bff10993394c63b56ce434342c9a47  actionview-4.1.12.gem
9a462b3ad2cfaf5f7914869efd5e8c62e54064b0  activemodel-4.1.12.gem
c0d65ed4f79115f7a9901d60201e720a7f556335  activerecord-4.1.12.gem
97fd3230896d900923dc650e788ccaaf3b06d692  activesupport-4.1.12.gem
9f6db196328b302c4c3a7ff3a1c7cd1a191221cc  rails-4.1.12.gem
8c7c04045df2eebc69e54c8426def69eca0f8bf6  railties-4.1.12.gem

Here are the checksums for 4.2.3:

$ shasum *4.2.3*
f02da8c3896d4c8cd208b7c555c2c2235e44ce0e  actionmailer-4.2.3.gem
d824941013ba3616aa643d4c5016d00bf2dc028f  actionpack-4.2.3.gem
53982ad7579069c2a5de4939bb8c689550bdd2ab  actionview-4.2.3.gem
280e774caf7335aba1b50441b4890803d18a666c  activejob-4.2.3.gem
0d2160b37223703d167cfd5a8cb358029ccbacd9  activemodel-4.2.3.gem
8799d638cc5cdbd59296392f0f1014a051378517  activerecord-4.2.3.gem
1dc5e9cba144dc9794bc4ebed19a8528b7287a76  activesupport-4.2.3.gem
0ef8f13382996c3480d09900e34988aae85f0886  rails-4.2.3.gem
0fa6b51c3e9f70f0ce9fb1d1977169537d19ae86  railties-4.2.3.gem

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

[ANN] Rails 4.2.3.rc1 and 4.1.12.rc1 have been released!

Hi everyone,

I am happy to announce that Rails 4.2.3.rc1 and 4.1.12.rc1 have been released.

If no regressions are found expect the final release this Thursday, on June 25, 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.11

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.2

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.12.rc1:

$ shasum *4.1.12.rc1*
5309022944d12fcf015f8993db2c69f66d0fa9c4  actionmailer-4.1.12.rc1.gem
7e66207c9bd27bd07966a93e4a14abbf792920d7  actionpack-4.1.12.rc1.gem
17a9c55edf3988a28af2017f901bcbcc7257c99a  actionview-4.1.12.rc1.gem
78a04199bb509617d672e62076a704849b90650d  activemodel-4.1.12.rc1.gem
b7ffcf6ac2c9929d18e406dfb9fd6b9858d3d893  activerecord-4.1.12.rc1.gem
c8bbbc325547bd3707b445e79c95406e057037c2  activesupport-4.1.12.rc1.gem
a3307e12472796620e1e7b3b71ce1e0c6a112854  rails-4.1.12.rc1.gem
dfd11e7529f6b21049644c16b62e53d898ce4013  railties-4.1.12.rc1.gem

Here are the checksums for 4.2.3.rc1:

$ shasum *4.2.3.rc1*
3af2c0a834e8f6c26656720419bedc2935df4424  actionmailer-4.2.3.rc1.gem
bdf102b742a963d3b1697e4e876900c1644fe502  actionpack-4.2.3.rc1.gem
94020ee0a2372d601de8c2e62a672ea35d1548cd  actionview-4.2.3.rc1.gem
f9429285835d11a9de31f51349d35f75bf242a02  activejob-4.2.3.rc1.gem
92cedde54d1c3951ed431825b36e6868b5c79142  activemodel-4.2.3.rc1.gem
9cafdd1bd85ca8a61c73f2cb31973cc4074c252f  activerecord-4.2.3.rc1.gem
8c2740af13ff4e664edef95f49a1e7536168e8fa  activesupport-4.2.3.rc1.gem
a1eeaaa8e7bb3a2f9ee29bf5525eaea54313a4a6  rails-4.2.3.rc1.gem
8aa764a9befa9ecad476bb7d07403da4ceea67a6  railties-4.2.3.rc1.gem

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