Browse files

Improve config.database_names example using #pluck

ActiveRecord provides #pluck as a better way to get all the values from one column than, so I changed the README to use it instead.
  • Loading branch information...
1 parent 803c28f commit 7164958a6eeed6827fbe16cfd6c696fb9f7a8891 @codeodor codeodor committed Dec 20, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2
@@ -164,7 +164,7 @@ of dbs to Apartment. You can make this dynamic by providing a Proc object to be
This object should yield an array of string representing each database name. Example:
# Dynamically get database names to migrate
- config.database_names = lambda{ }
+ config.database_names = lambda{ Customer.pluck(:database_name) }
# Use a static list of database names for migrate
config.database_names = ['db1', 'db2']
@@ -234,4 +234,4 @@ All jobs *must* stored in the global (public) namespace, so add it to the list o
## License
-Apartment is released under the [MIT License](
+Apartment is released under the [MIT License](

0 comments on commit 7164958

Please sign in to comment.