HeavyTechRuby/history

View on GitHub
app/queries/recent_locations.rb

Summary

Maintainability
A
0 mins
Test Coverage
B
83%
class RecentLocations
  include Enumerable

  def each(&)
    Location.order("created_at DESC").limit(10).find_each(&)
  end

  def size
    entries.size
  end
end