Re: [Rails-core] [Feature][ActiveRecord] `where.or` query method

2019-10-10 Thread T.J. Schuck
> I usually resort to using Arel for more complex queries; not as straight forward at first, but very powerful I find. Please note that Arel is a part of Rails' private API, so its direct usage is not encouraged, since it could change in breaking ways at any time. (See the Rails docs on what

Re: [Rails-core] [Feature][ActionCable] Possibility from server side to terminate subscription by specifying WebSocket close code and reason

2018-10-05 Thread T.J. Schuck
See also https://github.com/rails/rails/pull/29390 about using proper close codes for WebSockets. On Thu, Oct 4, 2018 at 1:45 PM, Artis Abolts wrote: > WebSocket.close() method accept two optional parameters: > > >1. code - A numeric value indicating the status code explaining why >the

Re: [Rails-core] [Feature][ActiveSupport::Duration] Use the current locale in .inspect

2018-06-22 Thread T.J. Schuck
Your proposed change wouldn't actually make the change offered up your example ("hours" to "heures"). The "locale" option here is being passed to `to_sentence` specifically, so the only thing that would likely change is the word connectors, so "10 years, 1 month *and* 1 day" would end up as "10

Re: [Rails-core] What should be my FAYE_URL value for Rails chat application?

2018-06-19 Thread T.J. Schuck
This mailing list (rubyonrails-core) is intended for discussion about development of the framework itself, not usage of it. For support issues or usage questions like this one that are not issues with Rails itself, please post to the rubyonrails-talk mailing list (

Re: [Rails-core] [Proposal] define String#json? to return boolean value if the object is json string

2018-04-19 Thread T.J. Schuck
Note that I'm not on the core team, so my answer is far from final, but: just a heads up that the current refrain on changes to Active Support (and particularly the core extensions) is roughly "We avoid adding new things to Active Support unless they are used in the framework or by a large number

Re: [Rails-core] Migrations not running in Docker

2018-03-05 Thread T.J. Schuck
This mailing list (rubyonrails-core) is intended for discussion about development of the framework itself, not usage of it. For support issues or usage questions like this one that are not issues with Rails itself, please post to the rubyonrails-talk mailing list (

Re: [Rails-core] ActiveStorage mupdf on heroku?

2018-01-17 Thread T.J. Schuck
This mailing list (rubyonrails-core) is intended for discussion about development of the framework itself, not usage of it. For support issues or usage questions like this one that are not issues with Rails itself, please post to the rubyonrails-talk mailing list (

Re: [Rails-core] Best way to data sync between Rails app and phone

2017-07-21 Thread T.J. Schuck
This mailing list (rubyonrails-core) is intended for discussion about development of the framework itself, not usage of it. For support issues or usage questions like this one that are not issues with Rails itself, please post to the rubyonrails-talk mailing list (

Re: [Rails-core] Redirect to requested page after succesful login

2017-05-18 Thread T.J. Schuck
Hey everyone! This mailing list (rubyonrails-core) is intended for discussion about development of the framework itself, not usage of it. For support issues or usage questions like this one that are not issues with Rails itself, please post to the rubyonrails-talk mailing list (

Re: [Rails-core] has_many through additional (default) attribute values for through record on adding

2016-12-21 Thread T.J. Schuck
This mailing list (rubyonrails-core) is intended for discussion about development of the framework itself, not usage of it. For support issues or usage questions like this one that are not issues with Rails itself, please post to the rubyonrails-talk mailing list (

Re: [Rails-core] Why do i need to specify the column type when removing? (migrations)

2016-11-14 Thread T.J. Schuck
Hi Gabriel, The `type` parameter is actually ignored when removing a column — see the documentation for `remove_column` here which specifies that as well. The docs also indicate why

Re: [Rails-core] Changing URL for devise_token_auth sign_in

2016-06-29 Thread T.J. Schuck
This mailing list (rubyonrails-core) is intended for discussion about development of the framework itself, not usage of it. For support issues or usage questions like this one that are not issues with Rails itself, please post to the rubyonrails-talk mailing list (

Re: [Rails-core] Rails edit action getting too big

2016-02-18 Thread T.J. Schuck
This mailing list (rubyonrails-core) is intended for discussion about development of the framework itself, not usage of it. For support issues or usage questions like this one that are not issues with Rails itself, please post to the rubyonrails-talk mailing list (

Re: [Rails-core] ActiveRecord::Querying#find_by_sql has a confusing interface?

2015-06-25 Thread T.J. Schuck
The `bind` argument was added as `bind_values` all the way back in 2010, with no change to the documentation: https://github.com/rails/rails/commit/cc468d3ec81d6f1298fca91c0549584b36dafcc6 So the docs are probably just wrong — I’m sure a documentation PR would be quickly merged. On Thu, Jun 25,

Re: [Rails-core] ActiveRecord::Querying#find_by_sql has a confusing interface?

2015-06-25 Thread T.J. Schuck
as documented, and fail if go by what you'd expect from the method definition instead. On Thu, Jun 25, 2015 at 11:48 AM, T.J. Schuck t...@getharvest.com wrote: The `bind` argument was added as `bind_values` all the way back in 2010, with no change to the documentation: https://github.com/rails/rails

Re: [Rails-core] Mailers --Need Help

2014-11-11 Thread T.J. Schuck
Hi Nicole, This mailing list (rubyonrails-core) is intended for discussion about development of the framework itself, not usage of it. For support issues or usage questions like this one that are not issues with Rails itself, please post to the rubyonrails-talk mailing list (

Re: [Rails-core] ObjectSpace#allocation_class_path not working as expected.

2014-06-12 Thread T.J. Schuck
This mailing list is specific to the development and design of Rails. ObjectSpace is a library in Ruby itself and has nothing in particular to do with Rails. Consider posting to one of the Ruby mailing lists instead: https://www.ruby-lang.org/en/community/mailing-lists/ On Thu, Jun 12, 2014 at

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] Enum, ActiveModel and I18n

2014-04-14 Thread T.J. Schuck
Why not put Enum into ActiveModel? We may need some enumeration into another model without ActiveRecord, a example: something like a mail object form with a enumeration for subject… If the object isn’t persisted to the DB, it doesn’t seem like you’d need to use AR::Enum — the primary benefit is

Re: [Rails-core] single quotes for controller generated routes

2014-01-13 Thread T.J. Schuck
I don’t think this justifies one over the other. First of all, on my machine, the “winning” version flip flops pretty consistently — each one wins about 50% of the time. Secondly, a half a second of performance difference over 50 *million* iterations doesn’t quite feel conclusive that one is

Re: [Rails-core] Setup of rails repo for contribution and existing failing tests

2013-08-16 Thread T.J. Schuck
Additionally, use the rails-dev-box for running the tests -- it's a standardized environment with all necessary dependencies installed: https://github.com/rails/rails-dev-box On Fri, Aug 16, 2013 at 12:27 PM, richard schneeman richard.schnee...@gmail.com wrote: If you have failing tests

Re: [Rails-core] Date.weekend?

2013-06-28 Thread T.J. Schuck
This introduces a localization issue -- not everyone has a Saturday/Sunday weekend! Particularly Islamic countries: http://en.wikipedia.org/wiki/Workweek_and_weekend#Islamic_countries but also Israel, Nepal, India, and others. On Thu, Jun 27, 2013 at 12:16 PM, Artem Kalinchuk art...@gmail.com

Re: [Rails-core] How should ActiveSupport::Cache handle nil cache key?

2013-06-25 Thread T.J. Schuck
From the table in your pull request, the MemCacheStore seems to be the one I'd expect from all the options, i.e. writing or reading a nil key raises ArgumentError: key cannot be blank. Considering the docs even go as far as to say MemCacheStore is currently the most popular cache store for