diff --git a/app/models/bulletin.rb b/app/models/bulletin.rb index eb7a61f..1df934a 100644 --- a/app/models/bulletin.rb +++ b/app/models/bulletin.rb @@ -136,7 +136,7 @@ class Bulletin end end def check_limit - check_status_limit(update_user) + check_status_limit(update_user).length>0 ? false : true end def check_status_limit(user,check_only=false) role_ids = user.member_profile.roles.map(&:id) rescue [] @@ -168,7 +168,7 @@ class Bulletin end end.compact end - reach_limit.length>0 ? false : true + reach_limit end def set_expire self.expirable_created_at = Time.now if self.is_preview