Ruby on Rails Wednesday, February 2, 2011

I am looking at a ruby script and testing it...
I don't fully understand the following line of code :

database = YAML::load_file("config/#{fetch(:db_file,
'database.yml')}")

=> fetch(:db_file, 'database.yml') ... what's is this function
fetch() ?

I know the fetch(key, *extras) in ActiveSupport, but this is not the
case.... any suggestion ?

thanks

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment