mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Clear up some ivar warnings
This commit is contained in:
parent
187b3b0b48
commit
fd0eb3d904
1 changed files with 13 additions and 3 deletions
|
@ -133,8 +133,13 @@ module ActiveRecord
|
|||
arel = h.is_a?(String) ? arel.having(h) : arel.having(*h)
|
||||
end
|
||||
|
||||
arel = arel.take(@limit_value) if @limit_value.present?
|
||||
arel = arel.skip(@offset_value) if @offset_value.present?
|
||||
if defined?(@limit_value) && @limit_value.present?
|
||||
arel = arel.take(@limit_value)
|
||||
end
|
||||
|
||||
if defined?(@offset_value) && @offset_value.present?
|
||||
arel = arel.skip(@offset_value)
|
||||
end
|
||||
|
||||
@group_values.uniq.each do |g|
|
||||
arel = arel.group(g) if g.present?
|
||||
|
@ -157,7 +162,12 @@ module ActiveRecord
|
|||
arel = arel.project(quoted_table_name + '.*')
|
||||
end
|
||||
|
||||
arel = @from_value.present? ? arel.from(@from_value) : arel.from(quoted_table_name)
|
||||
arel =
|
||||
if defined?(@from_value) && @from_value.present?
|
||||
arel.from(@from_value)
|
||||
else
|
||||
arel.from(quoted_table_name)
|
||||
end
|
||||
|
||||
case @lock_value
|
||||
when TrueClass
|
||||
|
|
Loading…
Reference in a new issue