module Randone::ActiveRecord::Relation
Public Instance Methods
randone()
click to toggle source
# File lib/randone/relation.rb, line 8 def randone where( 'id >= ?', rand(first.id..last.id) ).first end
# File lib/randone/relation.rb, line 8 def randone where( 'id >= ?', rand(first.id..last.id) ).first end