-
由 sinsoku 提交于
An error occurs when you pass a relation with SQL comments to the `or` method. ```ruby class Post scope :active, -> { where(active: true).annotate("active posts") } end Post.where("created_at > ?", Time.current.beginning_of_month) .or(Post.active) ``` In order to work without `ArgumentError`, it changes the `or` method to ignore SQL comments in the argument. Ref: https://github.com/rails/rails/pull/38145#discussion_r363024376
26a60c4f