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, opts = {}) ⇒ Object
- #random_by_id_shuffle(max_items = nil, opts = {}) ⇒ Object
- #random_weighted(ranking_column, max_items = nil, opts = {}) ⇒ Object
Instance Method Details
#random(max_items = nil, opts = {}) ⇒ Object
130 131 132 |
# File 'lib/randumb/relation.rb', line 130 def random(max_items = nil, opts = {}) relation.random(max_items, opts) end |
#random_by_id_shuffle(max_items = nil, opts = {}) ⇒ Object
138 139 140 |
# File 'lib/randumb/relation.rb', line 138 def random_by_id_shuffle(max_items = nil, opts = {}) relation.random_by_id_shuffle(max_items, opts) end |
#random_weighted(ranking_column, max_items = nil, opts = {}) ⇒ Object
134 135 136 |
# File 'lib/randumb/relation.rb', line 134 def random_weighted(ranking_column, max_items = nil, opts = {}) relation.random_weighted(ranking_column, max_items, opts) end |