Hi,

I am trying to emulate the similar process by which user account
activation is activated via email (as with the user lifecycle in Hobo
- <a href="https://<%= @host %><%= user_activate_path....etc)

I am trying to add a link (or button) in an email, which will create a
new instance of a model.

In the email template, I have passed certain variables through my
user_mailer.rb method, which I then use to create the new instance of
the model.

Which I try and create using the script below:

<button onclick="<%= MyModel.create :field1 => @field1, :field2 =>
@field2 %>" type="submit" >Create</button>

However, in this above implementation, the model instance seems to be
created when the email is sent, ignoring the button 'onclick'
function....

exactly the same issue seems to occur when using:

<a href="http://<%= @host %><%= MyModel.create :field1 =>
@field1, :field2 => @field2 %>Click Here.</a>

I realise that the href, is not necessarily the way to go, but was
just experimenting..

Is there a way of allowing an action to be accessed, only when a link
within the email is selected, or clicked, without triggering this when
the email is initially sent?

Many Thanks

Pete

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to