Skip to content
/ dbfu Public

An easy Ruby only ActiveRecord setup for your database

License

Notifications You must be signed in to change notification settings

jwo/dbfu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DbFu: an easy ruby only ActiveRecord setup

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.

Usage

  1. Clone and bundle
  2. copy config/database.yml.sample to config/database.yml and configure
  3. Add your ActiveRecord classes to models/wp_post.rb

Example

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)

LICENSE

Copyright Jesse Wolgamott 2012. MIT License (see LICENSE)

About

An easy Ruby only ActiveRecord setup for your database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages