Ruby on Rails Monday, November 4, 2019

Currently, when declaring mailbox routes, it's only possible to pass a string/symbol, which gets camelized into a class name:

routing /^save@/i     => :forwards
routing /@replies\./i => :replies

https://github.com/rails/rails/blob/722259444ae3a2dbdea7df50b4652e9d4aaaccdb/actionmailbox/lib/action_mailbox/router/route.rb#L31-L33

Would it make sens to allow the following syntax:
routing /noa/i,      class_name: 'LongHaul::NOAMailbox'
routing
/delivery/i, class_name: 'LastMile::DeliveryMailbox'

This way, all the mailboxes wouldn't have to live in the same directory.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/10289acc-0db4-492d-914a-96033a80f44a%40googlegroups.com.

No comments:

Post a Comment