[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?

[Rails-core] Re: [ActiveStorage] Use different services for different attachments in the same app

2019-01-31 Thread Dmitry Tsepelev
Hi Lucas! I have a PR for that - https://github.com/rails/rails/pull/34935, but it hasn't been reviewed yet :( On Thursday, 31 January 2019 19:42:04 UTC+3, Lucas Minissale wrote: > > Hello, > > Did you get anywhere with this? > > According to what I have been reading, it is currently not possib

[Rails-core] Re: [Feature] ActiveRecord support Models and Associations for entities that reside in a JSONB column

2019-10-01 Thread Dmitry Tsepelev
Hi Josh! There is a number of gems that can do this (or similar) thing for you: - https://github.com/DmitryTsepelev/store_model - https://github.com/palkan/store_attribute - https://github.com/marshall-lee/nested_record On Wednesday, 2 October 2019 05:23:14 UTC+3, Josh Marchello wrote: > > I'm c