Skip to content

Instantly share code, notes, and snippets.

@cnruby
Created March 30, 2011 03:15
Show Gist options
  • Save cnruby/893798 to your computer and use it in GitHub Desktop.
Save cnruby/893798 to your computer and use it in GitHub Desktop.
How To Use Rails The Function gsub_file
gsub_file 'config/environments/production.rb', /config.i18n.fallbacks = true/ do <<-'RUBY'
config.i18n.fallbacks = true
config.action_mailer.default_url_options = { :host => 'yourhost.com' }
RUBY
end
gsub_file 'config/environments/production.rb', /config.i18n.fallbacks = true/, "\
config.i18n.fallbacks = true
config.action_mailer.default_url_options = { :host => 'yourhost.com' }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment