inboxes icon indicating copy to clipboard operation
inboxes copied to clipboard

Setting default user model attribute displayed when creating new message

Open ghost opened this issue 14 years ago • 3 comments

hi There

How can I specify another attribute which is displayed to an end user when sending a message to someone. It seems to show their email address.. I want it to show their username... I have unpacked the gem and can edit anything I need to! Thank you

ghost avatar Aug 21 '12 19:08 ghost

If I understand you correctly, there is a config param called user_name (Inboxes::config.user_name). In your app's config you can write something like config.inboxes.user_name = "nickname" and it will use the nickname attribute to display the user.

kirs avatar Aug 21 '12 21:08 kirs

Thanks. That worked. One last question, is there a quick way to pass in a user object and make inboxes only pull in one user, instead of being able to select a user to message. So it is more like a private messaging system? Thanks.

ghost avatar Aug 29 '12 09:08 ghost

There is no shortcut for that, but you can create a Discussion object with only one speaker from the controller.

kirs avatar Aug 29 '12 11:08 kirs