Permalink
Browse files

Fix: followers and followings default to public

refs #52
  • Loading branch information...
1 parent 2ec84a2 commit cbeab6b80507395d6f83c611d623557ca9bb46a2 Jesse Stuart committed Dec 13, 2012
Showing with 2 additions and 0 deletions.
  1. +1 −0 lib/tentd/model/follower.rb
  2. +1 −0 lib/tentd/model/following.rb
@@ -27,6 +27,7 @@ def before_create
self.mac_key ||= SecureRandom.hex(16)
self.mac_algorithm ||= 'hmac-sha-256'
self.user_id ||= User.current.id
+ self.public = true if self.public.nil?
self.created_at = Time.now
super
end
@@ -18,6 +18,7 @@ class Following < Sequel::Model(:followings)
def before_create
self.public_id ||= random_id
self.user_id ||= User.current.id
+ self.public = true if self.public.nil?
self.created_at = Time.now
super
end

0 comments on commit cbeab6b

Please sign in to comment.