开发者

ROR + Search Domain Name From Table Using Method

In ruby I have to write a method, in which i have to retrieve 开发者_开发技巧the id from table of those employee having email id of domain "stackoverflow.com" and other than this email domain.

Separate Method should be there for this...

Table name : people, attribute name :email. Please suggest the method ?


People.find(:all, :select => 'id', :conditions => ["email like ?", '%stackoverflow.com'])

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜