I am creating a GUI for handling rails migration files and need to check
the list of defined environments in the database.yml file. Not being an
expert in reading YML files in ruby, I''m not sure what the best way to
do this is. I assume that I need to make some call to a YML parser but
I have no clue where to start. Anyone know how to do this?
Example:
development:
adapter: mysql
database: development
password: mypasswrd
host: localhost
port: 3306
test:
adapter: mysql
database: test
password: mypasswrd
host: localhost
port: 3306
production:
adapter: mysql
database: production
password: mypasswrd
host: localhost
port: 3306
...would return ["development", "test",
"production"].
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---