Ask A Question

Notifications

You’re not receiving notifications from this thread.

Advanced Mailboxer: Multiple User Conversations Discussion

Itzik Ben Hutta Itzik Ben Hutta

Cool music entrance :) Great video of course.

Reply

Thought it was about time to spruce up the videos. :)

Reply

Great one! Can you cover mailboxer attachments? Thanks!

Reply

Absolutely will cover that! :D

Reply

And here you go! :) https://gorails.com/episode...

Reply

Keyword args are the best part of ruby 2 (IMO). I use them in my own code whenever a method takes more than 1 arg. I try to keep methods simple so that there is only one to start with, but when I can't, it adds a lot of clarity. Thanks for bringing it up. I hope it becomes more common.

Reply

Thank you chris for this cover on this great gem

Reply

Hey Chris Just a thought but instead user_id could you cover how to make first_name & last_name as the parameters?

Reply

For the select box, you can customize it to display user names using this: http://apidock.com/rails/v4...

Reply

hey chris, if i want to NOT send email s for every message that i send to a user, how can i do that? how can i just keep these messages internal in my app? thanks

Reply

Just update the Mailboxer config to disable sending emails and you should be all set:

  config.uses_emails = false

Reply

Hey @excid3:disqus do you think you will come back to this and explain the cross model conversations? E.g. I might have a Client model and User model

and/or have message types like Feedback or Support but use Mailboxer for both?

Cheers
Josh

Reply

I wasn't planning to dive more into it, but I could be persuaded.

As far as multiple models, there's nothing special other than including the acts_as_messageable on them I think. See: https://github.com/mailboxe...

For different conversation types, you can probably add a column to the mailboxer_conversations table for the conversation_type and then you'd just have to create the Conversation record with that extra attribute. You may either need to create conversations directly through Mailboxer::Conversation model or you might do a send_message and then update the Mailboxer::Conversation record with the conversation_type after it has been created. I'm not sure which the best solution would be there but you can experiment with both and see what's cleanest / easiest. All in all that shouldn't be too bad.

Reply

Do you discuss how to delete/trash messages?

Reply

Winner! :D

Reply

Hello!

Does anyone know how to fix this issue? The ampersand is showing up in html, rather than showing the ampersand symbol. Ironically, Chinese characters show up fine. :D

https://gyazo.com/453666ac5e03a51dcde533c001f060d2

Thanks for any feedback.
-Monroe

Reply

I love the insight that an out-of-date gem can be an opportunity to learn how to level up your skills. BTW, here's an update about mailboxer: someone has forked and has answered some of the pull requests.

If you want a more updated version of mailboxer, check this out: https://github.com/chriscz/mailboxer/issues/1

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,329+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.