Create a gist now

Instantly share code, notes, and snippets.

ruby and rails recources
The Bastards Book of Ruby
Clever Algorithms
DS and Algos with OO Design Patterns in Ruby
MacRuby: The Definitive Guide
Humble Little Ruby Book
Programming Ruby
Read Ruby 1.9
Ruby Best Practices
Ruby on Rails Tutorial Book 多数据库
dev_basics: &dev_basics
username: root
<% %w(development test production).each do |env| %>
<%= env %>:
<<: *dev_basics
adapter: mysql
database: example_<%= env %>
oracle_<%= env %>:
<<: *dev_basics
adapter: oracle
database: example_oracle_<%= env %>
<% end %>
class User < ActiveRecord::Base
establish_connection "oracle_#{RAILS_ENV}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment