How can a user contact another user

I think this is a rather general question. I would like to implement the
following function in my website: Users can create different listings.
Other user can click on the listing and click a contact button that
links to a contact form. Here, users can send the listing user a
message.

Does anyone know a good reference, or a tutorial for this functionality?
Or does anyone know how to program this?

Not sure if this is what you are looking for, and you might have to go
back
and add other controllers etc from previous sections. But Michael
Hartl’s
tutorial has the “follow” feature in his sample_app…

Colin Mr. wrote in post #1155224:

Not sure if this is what you are looking for, and you might have to go
back
and add other controllers etc from previous sections. But Michael
Hartl’s
tutorial has the “follow” feature in his sample_app…
Learn Enough to Be Dangerous

No, I followed his tutorial already.
I’m looking for a function that lets one user contact another user.
So the user goes to a users profile, looks at one of his
listing/postings. Now he would like to send the posting user an inquiry
about this posting.
The user should be able to click on a contact button, that lets him get
in contact with the listing user.
Does this make sense?

Hassan S. wrote in post #1155231:

On Thu, Aug 14, 2014 at 5:52 PM, Friederike G.
[email protected] wrote:

Here, users can send the listing user a message.

Or does anyone know how to program this?

Think about what minimally addresses your scenario, e.g.

user message queue messages

Doesn’t seem too complex :slight_smile:

HTH,

Hassan S. ------------------------ [email protected]
Hassan Schroeder | about.me
twitter: @hassan

Hm… I’m sorry. I’m very new to ROR so there are many things still
tricky for me.
Could you explain a little further?

On Thu, Aug 14, 2014 at 5:52 PM, Friederike G.
[email protected] wrote:

Here, users can send the listing user a message.

Or does anyone know how to program this?

Think about what minimally addresses your scenario, e.g.

user message queue messages

Doesn’t seem too complex :slight_smile:

HTH,

Hassan S. ------------------------ [email protected]

twitter: @hassan

The has one has many is clear.
But thanks I will definitely read over it again :slight_smile:
I think what I’m struggling with more is how to actually deliver a
message from user to user.

On Fri, Aug 15, 2014 at 7:38 AM, Friederike G.
[email protected] wrote:

user message queue messages

Hm… I’m sorry. I’m very new to ROR so there are many things still
tricky for me.
Could you explain a little further?

“has_one” and “has_many” are very basic Rails (ActiveRecord)
association concepts. If that’s not clear, read this:

Active Record Associations — Ruby on Rails Guides

Well, read all the guides, but that one first :slight_smile:


Hassan S. ------------------------ [email protected]

twitter: @hassan

On Fri, Aug 15, 2014 at 9:49 AM, Friederike G.
[email protected]
wrote:

I think what I’m struggling with more is how to actually deliver a
message from user to user.

That is what you need to define. People have suggested email (rejected
by
you), a message queue (not understood). Step back and think about how
you
want the receiving user to experience this. Then design your models
accordingly.

On Fri, Aug 15, 2014 at 7:49 AM, Friederike G.
[email protected] wrote:

I think what I’m struggling with more is how to actually deliver a
message from user to user.

You add the message to the user’s message_queue.

That’s what “delivered” means. Not complex.


Hassan S. ------------------------ [email protected]

twitter: @hassan