Friday, October 16, 2015

This week in Rails: 4000 Subscribers, File Server Headers Config and More!

Posted by repinel

####

Hello everyone! This is Roque with the latest from the Rails world.

Sending out to over 4000 subscribers!

This Week in Rails just crossed 4000 subscribers. Thanks to all subscribers and collaborators! Stay tuned!

This Week’s Rails Contributors

26 people contributed to Rails this week, including 5 first-time contributors! If you are interested in becoming a contributor, you can have a look at the issues list.

New Stuff

Create a config for file server headers

Rails now allows any static file header to be defined using the configuration option config.public_file_server.headers.
This also deprecates the former option static_cache_control that would only apply the header Cache-Control.

Force SSL in mails

The config.force_ssl option will now force mails to use the protocol https for the host setup in config.action_mailer.default_url_options.

Allow multiple root routes in same scope level

Lets say your application has multiple root endpoints depending on a constraint. You can now describe them using root entries in your config/routes.rb file instead of having to use get statements.

Improved

Make Active Record increment! and decrement! concurency safe

This will prevent issues when performing updates from different instances of a same record.

The where method will now let you know when an argument type is unsupported

where will raise ArgumentError on unsupported types.

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!