Module: Randumb::ActiveRecord::Base
- Included in:
- ActiveRecord::Base
- Defined in:
- lib/randumb/relation.rb
Overview
Class methods
Instance Method Summary collapse
- #random(max_items = nil) ⇒ Object
- #random_by_id_shuffle(max_items = nil) ⇒ Object
- #random_weighted(ranking_column, max_items = nil) ⇒ Object
Instance Method Details
#random(max_items = nil) ⇒ Object
144 145 146 |
# File 'lib/randumb/relation.rb', line 144 def random(max_items = nil) relation.random(max_items) end |
#random_by_id_shuffle(max_items = nil) ⇒ Object
152 153 154 |
# File 'lib/randumb/relation.rb', line 152 def random_by_id_shuffle(max_items = nil) relation.random_by_id_shuffle(max_items) end |
#random_weighted(ranking_column, max_items = nil) ⇒ Object
148 149 150 |
# File 'lib/randumb/relation.rb', line 148 def random_weighted(ranking_column, max_items = nil) relation.random_weighted(ranking_column, max_items) end |