0

I want to build a user inbox system and choosing this simple-private-messages gem as the backbone. However, the documentation of this gem is rather primitive. I've generated the scaffold of this gem, however, I don't know what key the gem is used to define the recipient/sender.

I want the current_user is able to message a particular user via the link of its profile page and then it will automatically fill the username into the "to" field.

Would anyone please construct a demo app illustrating the implementation of this gem, thanks a lot.

Please advise.

The questioner
  • 724
  • 10
  • 21
  • 1
    I believe it does not work like this. It is you who create demo app, and if you have difficulties with one particular issue, you ask for help – mkk Mar 18 '13 at 09:40
  • OK, I'm generating such an app. Don't consider me an indolent coder. – The questioner Mar 18 '13 at 10:00
  • I have used the "mailboxer" gem and a custom user model (but you simply need to say to the model to act_as_messagable" so it doesn`t really matter what model you have). The documentation is quite good and understandable. As of the feature you want (to send a message to a particular user) you can simply pass the variable to the view. Here is a link to the [gem](https://github.com/ging/mailboxer) – mart1nn Mar 18 '13 at 11:15
  • mailboxer seems too complicated and beef up resources. Would there be any lightweight gem? I've considered acts_as_messageable and yet the problem is how to implement it in the view layer. I chose simple private messages because it provides a view scaffold, however, its coding style still in the rails 2 age, errors like "error_message_on" always prompt out. Should I switch to "acts-as-messageable" instead? – The questioner Mar 18 '13 at 14:57
  • Can you explain particularly why do you avoid mailboxer? I am just wondering if I have to consider switching it to something else too ;) It seems that acts-as-messageable is pretty similar to mailboxer (functionality at least) and the views should not be hard to implement. – mart1nn Mar 19 '13 at 20:07

0 Answers0