Fix to get yaml_db working with Rails 3.2.

#add_limit_offset is not available in Rails 3.2 anymore. I just do it by hand. It's compatible with mySQL and Postgres.