aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/query_methods.rb
diff options
context:
space:
mode:
authorLisa Ugray <lisa.ugray@shopify.com>2017-10-19 12:45:07 -0400
committerLisa Ugray <lisa.ugray@shopify.com>2017-11-09 14:29:39 -0500
commitc3675f50d2e59b7fc173d7b332860c4b1a24a726 (patch)
tree736119c8ea9b683ac465c07e6a640d7e14bbc1b0 /activerecord/lib/active_record/relation/query_methods.rb
parentdac7c8844b4d9944eaa0fca98b45ee478cdb7201 (diff)
downloadrails-c3675f50d2e59b7fc173d7b332860c4b1a24a726.tar.gz
rails-c3675f50d2e59b7fc173d7b332860c4b1a24a726.tar.bz2
rails-c3675f50d2e59b7fc173d7b332860c4b1a24a726.zip
Move Attribute and AttributeSet to ActiveModel
Use these to back the attributes API. Stop automatically including ActiveModel::Dirty in ActiveModel::Attributes, and make it optional.
Diffstat (limited to 'activerecord/lib/active_record/relation/query_methods.rb')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 897ff5c8af..9c5be4ad9b 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -930,7 +930,7 @@ module ActiveRecord
arel.where(where_clause.ast) unless where_clause.empty?
arel.having(having_clause.ast) unless having_clause.empty?
if limit_value
- limit_attribute = Attribute.with_cast_value(
+ limit_attribute = ActiveModel::Attribute.with_cast_value(
"LIMIT".freeze,
connection.sanitize_limit(limit_value),
Type.default_value,
@@ -938,7 +938,7 @@ module ActiveRecord
arel.take(Arel::Nodes::BindParam.new(limit_attribute))
end
if offset_value
- offset_attribute = Attribute.with_cast_value(
+ offset_attribute = ActiveModel::Attribute.with_cast_value(
"OFFSET".freeze,
offset_value.to_i,
Type.default_value,