[Rails-core] About pool management in ActiveRecord

2014-05-30 Thread Rodrigo Rosenfeld Rosas
Yesterday someone commented in my article on Sequel, where I compare it with AR in some aspects, including pool management: http://rosenfeld.herokuapp.com/en/articles/ruby-rails/2013-12-18-sequel-is-awesome-and-much-better-than-activerecord To answer his comments I decided to first take a

Re: [Rails-core] About pool management in ActiveRecord

2014-05-30 Thread T.J. Schuck
Specifically regarding a Thread outside of the main request thread holding onto a connection, you might be interested in https://github.com/rails/rails/pull/14360 about more intelligently reaping connections held onto by dead threads. Unfortunately, the comments on that PR say it will not be

Re: [Rails-core] About pool management in ActiveRecord

2014-05-30 Thread Rodrigo Rosenfeld Rosas
Hi Schuck, that was indeed a smart trick to associate each connection with is owner thread and check whether they are alive when there's apparently no available connection. In that case the reaper is run and could free up those connections when the thread is dead. I liked it :) Simple and

[Rails-core] How to customize the singularization of class name in rails.

2014-05-30 Thread prachi
Hello, I am working on Rails 4.1.0. And i have generated leaves_controller and Leave model in my application. But the application generated routes for leaves as like new_leafe, edit_leaf etc. Actually I want the singularize string of Leave as Leave only, like new_leave_path,

[Rails-core] Adding Model#model_name

2014-05-30 Thread Jeremy Friesen
Following up on https://github.com/rails/rails/issues/15428, with adjustments. Throughout the Rails code there are a few references to `object.class.model_name`. Instead of always pushing this up to the class, it makes sense to me that we ask the model for its model_name. This might obviate

Re: [Rails-core] Adding Model#model_name

2014-05-30 Thread Amiel Martin
Yes, please! On Fri, May 30, 2014 at 11:11 AM, Jeremy Friesen jeremy.n.frie...@gmail.com wrote: Following up on https://github.com/rails/rails/issues/15428, with adjustments. Throughout the Rails code there are a few references to `object.class.model_name`. Instead of always pushing

Re: [Rails-core] How to customize the singularization of class name in rails.

2014-05-30 Thread Steve Klabnik
Hey Prachi! This list is solely for new feature discussion and other meta issues. For actual help with Rails, please post to rubyonrails-talk or Stack Overflow. Thanks! -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Core group. To unsubscribe from