提交 fd0eb3d9 编写于 作者: J Jeremy Kemper

Clear up some ivar warnings

上级 187b3b0b
......@@ -133,8 +133,13 @@ def build_arel
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 @@ def build_arel
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册