【问题标题】:Is there an updated version of 'where_clauses' method for Arel in Rails?Rails 中的 Arel 是否有更新版本的“where_clauses”方法?
【发布时间】:2018-08-15 11:23:37
【问题描述】:

所以我将 Rails 从 4.0.1 更新到 4.1.16,但出现以下错误:

Failure/Error: self.published.arel.where_clauses.join(' AND ')

  NoMethodError:
    undefined method `where_clauses' for #<Arel::SelectManager:0x007fd773b1dd50>

我查看了 Arel 的文档(使用版本 5.0.1.20140414130214),但找不到相同的方法。是否已被替换,如果是,替换为什么?

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-4 arel


    【解决方案1】:

    是否已被替换,如果是,替换为什么?

    它是deprecated,然后是removed,没有替代品。似乎您需要检查使用 where_clauses 的场所的逻辑,并使用当前的 existing methods 重新实现应用程序的这些部分

    【讨论】:

      猜你喜欢
      • 2013-01-26
      • 1970-01-01
      • 2016-10-22
      • 1970-01-01
      • 1970-01-01
      • 2011-03-16
      • 2012-03-21
      • 2017-12-12
      • 1970-01-01
      相关资源
      最近更新 更多