What started as a way to use Postgres in pure ruby for Ruby Off Rails became useful in Wordpress and other databases where I wanted to use Ruby.
- Clone and bundle
- copy config/database.yml.sample to config/database.yml and configure
- Add your ActiveRecord classes to
models/wp_post.rb
Gather your published wordpress posts:
class WpPost < ActiveRecord::Base
scope :published, lambda { where(post_status: "publish")}
end
WpPost.published.order("post_date desc").limit(10)
Copyright Jesse Wolgamott 2012. MIT License (see LICENSE)