Skip to content

Commit

Permalink
Update routes.rb
Browse files Browse the repository at this point in the history
fixing route to redirect to edit page for incoming/outgoing messages
  • Loading branch information
HelenWDTK committed Feb 16, 2024
1 parent 4ffbbda commit 347db68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/routes.rb
Expand Up @@ -553,6 +553,10 @@ def matches?(request)
direct :admin_note_parent do |note|
if note.notable_tag
admin_tag_path(tag: note.notable_tag)
elsif note.notable.is_a?(OutgoingMessage)
edit_admin_outgoing_message_path(note.notable)
elsif note.notable.is_a?(IncomingMessage)
edit_admin_incoming_message_path(note.notable)
elsif note.notable
url_for([:admin, note.notable])
else
Expand Down

0 comments on commit 347db68

Please sign in to comment.