首页 > 代码库 > ruby find

ruby find

User.find(    :all,      :select => "name.*",    :from => "users",    :joins => " inner join role_relations rr on rr.user_group_id =  ugn.user_group_id ",    :conditions => "rr.user_id = #{user_id} and ugn.news_id = #{news_id}")