联系我们Rails 3中的功能 [英] Contact us functionality in Rails 3

查看:169
本文介绍了联系我们Rails 3中的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




  • 名称

  • 我想在Rails 3中与我们联系,
  • 电子邮件

  • 留言标题

  • 留言正文



发布的邮件旨在转到我的电子邮件地址,因此我不会必须将邮件存储在数据库中。我必须使用 ActionMailer ,任何宝石或插件?

解决方案

p> 教程是一个很好的例子 - 它是Rails 3



更新:



本文比我之前发布的一个更好的例子,完美无瑕的工作



第二次更新



我还建议合并一些此轨道电视中概述的技巧 active_attr 宝石,其中Ryan Bates引导您完成为联系页面设置无Tab模型的过程。



第三次更新



我写了自己的测试驱动的博客文章关于它


I want to make a contact us form in Rails 3 with the following fields:

  • Name
  • Email
  • Message title
  • Message body

The posted messages are intended to go to my email address so I don't neccessarily must store the messages in the database. Do I have to use ActionMailer, any gem or plugin for it?

解决方案

This tutorial is an excellent example - and it's Rails 3

Update:

This article is a better example than the one I posted earlier, works flawlessly

Second Update:

I would also recommend merging-in some of the techniques outlined in this railscast on the active_attr gem, where Ryan Bates walks you through the process of setting up a tabless model for a contact page.

Third Update:

I wrote my own test-driven blog post about it

这篇关于联系我们Rails 3中的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆