16 lines
323 B
Ruby
16 lines
323 B
Ruby
|
|
module JamRuby
|
||
|
|
class FacebookSignup < ActiveRecord::Base
|
||
|
|
|
||
|
|
before_create :generate_lookup_id
|
||
|
|
|
||
|
|
def self.delete_old
|
||
|
|
FacebookSignup.where("created_at < :week", {:week => 1.week.ago}).delete_all
|
||
|
|
end
|
||
|
|
|
||
|
|
private
|
||
|
|
def generate_lookup_id
|
||
|
|
self.lookup_id = SecureRandom.urlsafe_base64
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|