1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

adding deprecation warning for where_clauses

This commit is contained in:
Aaron Patterson 2010-12-26 19:56:07 -07:00
parent 32386f8860
commit cefad1e213
3 changed files with 10 additions and 1 deletions

View file

@ -31,6 +31,9 @@
* Arel::Table#primary_key is deprecated and will be removed in 3.0.0 with no
replacement.
* Arel::SelectManager#where_clauses is deprecated and will be removed in
3.0.0 with no replacement.
== 2.0.7 (unreleased)
* Bug Fixes

View file

@ -17,5 +17,9 @@ module Arel
def create_on expr
Nodes::On.new expr
end
def grouping expr
Nodes::Grouping.new expr
end
end
end

View file

@ -30,7 +30,9 @@ module Arel
end
def where_clauses
#warn "where_clauses is deprecated" if $VERBOSE
if $VERBOSE
warn "(#{caller.first}) where_clauses is deprecated and will be removed in arel 3.0.0 with no replacement"
end
to_sql = Visitors::ToSql.new @engine
@ctx.wheres.map { |c| to_sql.accept c }
end