User to user private messaging system integration
I came across this site for a list of private messaging gems
and in particular I thought this might be the one to go for:
1) it provides emails as a notification when a user receives a message on the app
2) mailbox can be used in other models such as listing and not only users.
Everything about this gem looks great and I'm trying to implement this. In the context of etsydemo course where each listing will have 'message me!' button in its show.html.erb page, it looks quite clear that I need to add
'act_as_messageable' to the listing.rb model file.
From reading 'how can I send a message section?'
i was thinking that i should write into views/listings/show.html.erb the following code?
user.send_message(beta, "Body", "subject")
but i guess I need to somehow define this 'send_message' function in listing.controller file but the github page doesn't specify this...
It seems to me that that there should be more code that needs to be added rather than the two 'act_as_messageable' and 'user.send_message(beta, "Body", "subject").
I would much appreciate if you could let me know whether I am taking the right direction in implementing this gem thank you!
Posted almost 6 years ago by