Skip to content

Commit

Permalink
Patch code to handle method name conflict with permanent_records; 'de…
Browse files Browse the repository at this point in the history
…leted'
  • Loading branch information
tapn2it committed Jun 11, 2016
1 parent f2ac542 commit 7350b8c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion app/models/mailboxer/receipt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ class Mailboxer::Receipt < ActiveRecord::Base
scope :inbox, lambda { where(:mailbox_type => "inbox") }
scope :trash, lambda { where(:trashed => true, :deleted => false) }
scope :not_trash, lambda { where(:trashed => false) }
scope :deleted, lambda { where(:deleted => true) }

#TODO Patched Victor Christensen at 2:40 PM on 6/11/16
# patched line below to deal with a conflict with permanent_records gem; method with same name
# scope :deleted, lambda { where(:deleted => true) }
if defined? deleted
scope :mb_deleted, lambda { where(:deleted => true) }
else
scope :deleted, lambda { where(:deleted => true) }
end


scope :not_deleted, lambda { where(:deleted => false) }
scope :is_read, lambda { where(:is_read => true) }
scope :is_unread, lambda { where(:is_read => false) }
Expand Down

0 comments on commit 7350b8c

Please sign in to comment.