aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-07 23:41:00 +0200
committerXavier Noria <fxn@hashref.com>2016-08-07 23:41:00 +0200
commitb45c9ca9b6571108242c1dfc3d3e160f56baf025 (patch)
tree831cdef7e70fd26f001aa108daf2365a5fdc8b87 /activerecord/lib/active_record/relation
parentf90ee8ce2733326e9e1bf91426bb401017adb483 (diff)
downloadrails-b45c9ca9b6571108242c1dfc3d3e160f56baf025.tar.gz
rails-b45c9ca9b6571108242c1dfc3d3e160f56baf025.tar.bz2
rails-b45c9ca9b6571108242c1dfc3d3e160f56baf025.zip
revises most Lint/EndAlignment offenses
Some case expressions remain, need to think about those ones.
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r--activerecord/lib/active_record/relation/finder_methods.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb
index 6349701dba..7bf84c2f15 100644
--- a/activerecord/lib/active_record/relation/finder_methods.rb
+++ b/activerecord/lib/active_record/relation/finder_methods.rb
@@ -544,12 +544,12 @@ module ActiveRecord
def find_nth_with_limit(index, limit)
# TODO: once the offset argument is removed from find_nth,
- # find_nth_with_limit_and_offset can be merged into this method
+ # find_nth_with_limit_and_offset can be merged into this method.
relation = if order_values.empty? && primary_key
order(arel_attribute(primary_key).asc)
- else
- self
- end
+ else
+ self
+ end
relation = relation.offset(index) unless index.zero?
relation.limit(limit).to_a
@@ -561,9 +561,9 @@ module ActiveRecord
else
relation = if order_values.empty? && primary_key
order(arel_attribute(primary_key).asc)
- else
- self
- end
+ else
+ self
+ end
relation.to_a[-index]
# TODO: can be made more performant on large result sets by