lib/muck-users/models/access_code.rb in muck-users-3.1.12 vs lib/muck-users/models/access_code.rb in muck-users-3.1.13

- old
+ new

@@ -14,11 +14,11 @@ scope :by_newest, order('access_codes.created_at DESC') scope :by_alpha, order('access_codes.code ASC') scope :active, where('access_codes.expires_at > Now() AND access_codes.uses <= use_limit') # Used to make bulk access code easier to deal with - attr_accessor :emails, :subject, :message, :send_requests, :send_request_limit + attr_accessor :emails, :subject, :message, :send_request_limit end module ClassMethods @@ -66,9 +66,19 @@ end def expired? self.expires_at? && self.expires_at < Time.now end - - end + + def send_requests=(sr) + @send_request = sr + end + + def send_requests + return false if @send_request == '0' + return false if @send_request == 'false' + return @send_request + end + + end end end \ No newline at end of file