开发者

ROR + Search Domain Name From Table Using Method

开发者 https://www.devze.com 2023-02-16 11:11 出处:网络
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.

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

精彩评论

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