pochat
pochat

Reputation: 33

ruby on rails display if page has been visited (pending, yes, no)

I am using Rails 4 and PHPmyadmin

I designed a form that sends an email with two links, let's call them Link #1 and Link #2.

I need to know if the user that received the email has clicked on link #1 or link #2.

I already have the landing view #1 and view #2 with their corresponding id's, and can access both links.

The end result is that in my list table I need to display the status of every email sent with either:

I know that I need to associate the email id with the view id, but don't know how to do this.

Something like this:

EMAIL.......... LINK CLICKED
[email protected]  pending
[email protected]  Link 1
[email protected]  Link 2

I have found this similar question and this other one, however I don't know how to implement it in my app.

Upvotes: 2

Views: 639

Answers (1)

noman tayyab
noman tayyab

Reputation: 365

Each link relates to a method in the controller that renders the view.. in your case Link#1 and Link#2 will correspond to some specific action in some controller. You can place checks there against the user you have sent email. Please tell if this helps

Upvotes: 1

Related Questions