Friday, October 2, 2015

This week in Rails: Job Priorities, Fast Failing Tests and Fixtures... Oh My!

Posted by gregmolnar

Hello everyone! This is Greg with help from Andy (welcome!) bringing you the latest news from Rails.

This weeks Rails contributors

33 people contributed to Rails this week, including 3 first-time contributors! If you are interested in becoming a contributor, have look on the issues list.

New Stuff

Add job priorities to ActiveJob

This commit allows you to set the priority for your jobs with Active Job, if your backend supports this. For more details head over to the pull request.

Fail fast reporting in test runner

If you call your test suite with --fail-fast it will abort the test run on the first failure.

Allow fixtures files to set the model class in the file itself

From now on you can set the model class in your fixture files, but set_fixture_class on your model will override it.

Fixed

Handle nested fields_for by adding indexes to record_name

This commit adds indexes to the inputs in the inner blocks of a nested fields_for, so Rails won’t raise an exception on the submission of the form.

Add a hidden field on the collection_radio_buttons

This commit fixes an issue with strong_parameters if you have a single collection_radio_button on your form and the form is submitted with no selection.

Fix parameter sanitization for query methods

With this commit the Action Controller parameters are sanitized before being passed to the Active Record query methods.

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.

Until next time!