ActiveRecord select a string field has a certain length in Rails 3?

Viewed 13524

I've got a series of Posts and would like to select all posts where its title size is lesser than 30, how to do that?

Posts.where("len(title) < 30")?
2 Answers
Related