Skip to content

Instantly share code, notes, and snippets.

@refriedchicken
Created February 3, 2010 06:43
Show Gist options
  • Save refriedchicken/293402 to your computer and use it in GitHub Desktop.
Save refriedchicken/293402 to your computer and use it in GitHub Desktop.
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