[Rails-core] [Feature]Make numericality validation skip >,>=,<, <= checks when passed proc/method call returns nil

2019-01-15 Thread Dmitry Tsepelev
Right now the following code would produce an error: class ProductFilter include ActiveModel::Validations validates :min_price, numericality: { allow_nil: true } validates :max_price, numericality: { allow_nil: true, greater_than: :min_price } end ProductFilter.new(max_price: 100).valid?

Re: [Rails-core] [Feature][ActiveStorage] add option for proxying files to allow CDN caching

2019-01-15 Thread Jonathan Fleckenstein
Hello, if George or somebody else has time to review this pr https://github.com/rails/rails/pull/34477 it would be greatly appreciated. On Friday, November 2, 2018 at 11:38:54 PM UTC-4, Jonathan Fleckenstein wrote: > > Global with individual override would be perfect! I’ll try to put this >

Re: [Rails-core] [ActiveRecord] [Feature Proposal] Common Table Expression support

2019-01-15 Thread Daniel Heath
IME, which subset of features you use largely depends on the industry sector you're in. There are many rails features I haven't used in the past decade of working on rails apps, but they are important to some users. CTEs are primarily useful when dealing with much larger databases and complex

Re: [Rails-core] [ActiveRecord] [Feature Proposal] Common Table Expression support

2019-01-15 Thread Rafael Mendonça França
Cool! I think the hard work is already done. But I still find it hard to justify this in the framework. It is a feature that is out of Rails for more than 10 years and I personally never needed it working in many applications through the years so I'm not sure if I want to add that complexity to

Re: [Rails-core] [ActiveRecord] [Feature Proposal] Common Table Expression support

2019-01-15 Thread Sean Linsley
While we’re on the subject, I have a PR to get postgres_ext working with Rails 5.2, but need help from someone that has experience with Arel’s internals. https://github.com/danmcclain/postgres_ext/pull/2 Though more broadly I’m of the

Re: [Rails-core] [ActiveRecord] [Feature Proposal] Common Table Expression support

2019-01-15 Thread Rafael Mendonça França
Thank you for the feature proposal. It doesn't seem to be difficult to implement this as a gem given most of the APIs you need in able to implement something like this are public. What do you think about implementing this first as a gem and see if there are adoption of this feature before

[Rails-core] Fix for ActionView::FixtureResolver

2019-01-15 Thread Edward Rudd
I opened this PR ( https://github.com/rails/rails/pull/30666 ) over a year ago to fix a small bug in the ActionView::FixtureResolver where it does not handle stubbing templates that use variants in their name. The variants option on render allow me to do something like this render variants:

[Rails-core] [ActiveRecord] [Feature Proposal] Common Table Expression support

2019-01-15 Thread Daniel Heath
I'd like to be able to use my ActiveRecord scopes in a CTE for another scope. Proposed syntax class Post < ActiveRecord::Base has_many :comments end class Comment < ActiveRecord::Base belongs_to :post end Post.with(Comment.select(:post_id), name: :post_ids, recursive: false).where(id:

Re: [Rails-core] Re: [Discussion] Rails needs Active Deployment

2019-01-15 Thread Carlos Eduardo Ribeiro
Dpl (https://github.com/travis-ci/dpl) is also a very interesting project. Em ter, 15 de jan de 2019 às 07:41, dixpac escreveu: > Maintaining Rails application both on Heroku(cloud) and on-premises I > completely understand frustrations from the post above. That being said I > don’t see easy

[Rails-core] Re: [Discussion] Rails needs Active Deployment

2019-01-15 Thread dixpac
Maintaining Rails application both on Heroku(cloud) and on-premises I completely understand frustrations from the post above. That being said I don’t see easy way for Rails to manage external services such as; Database, Redis, Elastic, etc… Maybe one area where Rails could help is ability to