diff --git a/app/models/application_record.rb b/app/models/application_record.rb index 10a4cba..5a68703 100644 --- a/app/models/application_record.rb +++ b/app/models/application_record.rb @@ -1,3 +1,7 @@ class ApplicationRecord < ActiveRecord::Base self.abstract_class = true + + def self.random + order("RANDOM()").limit(1).first + end end