Skip to content

Instantly share code, notes, and snippets.

@refriedchicken
Created Feb 3, 2010
Embed
What would you like to do?
def update_maps_key
a_config = YAML.load_file "#{RAILS_ROOT}/config/gmaps_api_key.yml"
a_config["production"].merge!({self.domain_name => self.key})
File.open("#{RAILS_ROOT}/config/gmaps_api_key.yml", 'w') { |f| YAML.dump(a_config, f) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment