Skip to content

Commit

Permalink
Update conditions on Govbox::Folder
Browse files Browse the repository at this point in the history
  • Loading branch information
luciajanikova committed Sep 19, 2023
1 parent 2f235c2 commit 8ee865c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/govbox/folder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ def full_name
end

def inbox?
name == "Inbox"
name.start_with? 'Inbox'
end

def bin?
name == 'Bin'
end

def drafts?
name == 'Drafts'
name.start_with? == 'Drafts'
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class UpdateReplyableAttributesOnMessages < ActiveRecord::Migration[7.0]
def change
Message.find_each do |message|
govbox_message = Govbox::Message.find_by(message_id: message.uuid)
message.update(replyable: govbox_message.replyable?)
end
end
end

0 comments on commit 8ee865c

Please sign in to comment.