Created
March 25, 2012 09:58
-
-
Save azhao1981/2192638 to your computer and use it in GitHub Desktop.
ruby and rails recources
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Bastards Book of Ruby http://ruby.bastardsbook.com/ | |
Clever Algorithms http://www.cleveralgorithms.com | |
DS and Algos with OO Design Patterns in Ruby http://www.brpreiss.com/books/opus8/ | |
MacRuby: The Definitive Guide http://macruby.labs.oreilly.com/ | |
Humble Little Ruby Book http://humblelittlerubybook.com/ | |
Programming Ruby http://ruby-doc.org/docs/ProgrammingRuby/ | |
Read Ruby 1.9 http://ruby.runpaint.org/ | |
Ruby Best Practices http://rubybestpractices.com/ | |
Ruby on Rails Tutorial Book http://railstutorial.org/book | |
http://pullmonkey.com/2008/4/21/ruby-on-rails-multiple-database-connections/ 多数据库 | |
dev_basics: &dev_basics | |
username: root | |
password: | |
<% %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}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment