here is the problem scenario
Client do a signup --> Controller do validations, if successful, say "thanks" to client, so I take it as client ctx is closed, now I need to send email to client asking for email verification, so jst after sending "thanks" to client, I call another models (but uses same DB table as caller)API Notifier::deliver_signup_thanks
Now this api is mapped to a RHTML file, which contains following link
http://host/emailverify/somebiguniqueidcomeshere
Now for generating above link, I want to use link_to thus avoid hardcoding hostname in rhtml, but link_to fails here say'g url_for not found.
Currently only way I see to solve this issue is to use environment variable wherever we need to specify hostname, but I just wanna find what is the best approach for this?
Any1?
Tags: rails ruby RollingOnRails HemantOnRails
Subscribe to:
Post Comments (Atom)
1 comment:
Try this!
http://wiki.rubyonrails.com/rails/pages/HowtoUseUrlHelpersWithActionMailer
Dave!
Post a Comment