I want to do something like this in Rails: "SELECT *, COUNT(post_id) AS total FROM comments ... conditions"
Is that SELECT possible in Rails. Ohterwise, I can use find_by_sql, but i'm trying to avoid SQL injection and this SQL needs a parameter. Is there a way to sanitize this parameter? I'll appreciate any help -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.