HeavyTechRuby/history

View on GitHub
app/queries/recent_stories.rb

Summary

Maintainability
A
0 mins
Test Coverage
D
66%
class RecentStories
  include Enumerable

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

  def size
    entries.size
  end
end