instance method
add_source
Ruby on Rails 4.1.16
Since v3.0.20Signature
add_source(source, options={})
Add the given source to Gemfile
add_source "http://gems.github.com/"
Parameters
-
sourcereq -
optionsopt = {}
Source
# File railties/lib/rails/generators/actions.rb, line 67
def add_source(source, options={})
log :source, source
in_root do
prepend_file "Gemfile", "source #{source.inspect}\n", verbose: false
end
end
Defined in railties/lib/rails/generators/actions.rb line 67
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::Actions