This is Prathamesh with this week’s recap from Rails. Lets see which issues got fixed, which features got added. Ready, steady, go!
This week 40 people contributed to Rails, 7 out of them are new. Do you also want to help? Check out the issue tracker and start making Rails better.
By the way, Xavier and Kasper added the permalink feature to the link of weekly contributors. So each weekly contributors link is forever to stay!
Faced problem with queries fetching thousands of records and slowing everything? Now you will get a nice warning if the query fetches more number of records than configured value by using
active_record.warn_on_records_fetched_greater_than config option.
Do you remember the old friend
alias_method_chain? It had a good run. But now it will be deprecated in Rails 5 in favor of
Module#prepend which was introduced in Ruby 2.0.
We just got two steps closer to moving type casting of various data types for PostgreSQL from Active Record to PostgreSQL adapter.
With this patch, you can now check the current request’s variant using
request.variant.tablet? and so on.
If you were missing your job class in the Sidekiq logs and instead seeing some weird
ActiveJob::JobWrapper, don’t worry. Now you will get your job class back in the logs because ActiveJob will pass the wrapped class name back to Sidekiq.
Previously, while joining tables having
has_many :through association, Active Record was not using the actual table name. It was generating wrong SQL and resulting into
ActiveRecord::InvalidStatement error when used with calculation methods like
#count. No need to worry, its fixed now!
Previously if the table name was made singular using
ActiveRecord::Base.pluaralize_table_names = false, name of the fixture file getting generated was still pluralized. No longer true! Get singular fixture file for singular table name now onwards.
Checkout Rails Girls summer of code. You can submit your open source project to be included. Also you can help fund the campaign.
That’s all for This week in Rails. As always, there are more changes than we have room to cover here, but feel free to check them out yourself!
P.S. If you enjoyed this newsletter, why not share it with your friends? :) If you wish to be part of this project please don’t hesitate to contact Godfrey – there’re a lot of ways you could help make this newsletter more awesome!