我正在开发一个应用程序,我需要在用户的电子邮件地址之前传递"@"符号作为他/她的名字和姓氏.例如,如果用户的电子邮件地址为"user@example.com",则用户提交表单时,我会从电子邮件中删除"@ example.com",并将"user"指定为姓名.
我已经做过研究,但是无法在Ruby中找到这样做的方法.有什么建议 ??
在处理相当大的Rails项目时,Zeus是一个很好的工具,可以降低Rails应用程序的加载时间并运行测试套件.然而,经过一段时间我开始面对这个问题与我的所有项目启动宙斯:

我做了一些研究,并尝试了一些资源来解决这个错误,但没有一个工作.如果有人能指出我正确的方向来解决这个问题,我将感激不尽.
我在Mac OSX 10.8.2上
谢谢
我遇到了一个我以前从未遇到过的问题.我正在研究由另一个程序员编写的代码,这有点乱.
这是问题所在.我在我的模型中有以下验证:
validates_presence_of :subscription_level,
:message => 'please make a selection'
validates_presence_of :shipping_first_name
validates_presence_of :shipping_last_name
validates_presence_of :shipping_address
validates_presence_of :shipping_city
validates_presence_of :shipping_state
validates_presence_of :shipping_postal_code
validates_presence_of :shipping_country
validates_presence_of :billing_first_name
validates_presence_of :billing_last_name
validates_presence_of :billing_address
validates_presence_of :billing_city
validates_presence_of :billing_state
validates_presence_of :billing_postal_code
validates_presence_of :billing_country
validates_presence_of :card_number
validates_numericality_of :card_number
validates_presence_of :card_expiration_month
validates_numericality_of :card_expiration_month
validates_presence_of :card_expiration_year
validates_numericality_of :card_expiration_year
validates_presence_of :card_cvv
validates_numericality_of :card_cvv
Run Code Online (Sandbox Code Playgroud)
我对这个控制器有两个动作.一个是new另一个是redeem.我希望通过操作执行所有这些验证,new但希望跳过大部分redeem操作.
我现在面临的问题是valid?在控制器中使用也验证了redeem行动不需要的东西.
我怎么能绕过这个?
我花了无数个小时试图在我的Intel Mac上设置PostgreSql.
我能够安装Rails,但除了PostgreSql之外,我的Mac上都没有安装.
任何人都有任何解决方案或任何我可以遵循安装它的教程?
PS我刚开始使用Mac作为我的开发机器.我之前一直在使用Windows!