Module: ConsoleUtils::ActiveRecordUtils::RandomRecord::FinderMethods
- Defined in:
- lib/console_utils/active_record_utils/random_record.rb
Instance Method Summary collapse
Instance Method Details
#anyid ⇒ Object
12 13 14 |
# File 'lib/console_utils/active_record_utils/random_record.rb', line 12 def anyid anyone.id end |
#anyone ⇒ Object
8 9 10 |
# File 'lib/console_utils/active_record_utils/random_record.rb', line 8 def anyone random.first end |
#random ⇒ Object
4 5 6 |
# File 'lib/console_utils/active_record_utils/random_record.rb', line 4 def random reorder('RANDOM()') end |