Allow full class names (with namespaces) for Action Mailbox routes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Allow full class names (with namespaces) for Action Mailbox routes

Ali Ismayilov
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/10289acc-0db4-492d-914a-96033a80f44a%40googlegroups.com.