Skip to content
This repository
Browse code

Add gem method documentation to the generators guide

  • Loading branch information...
commit 77a228785ccc6832d8e30438380aea7ad9706a70 1 parent 74e1788
Ryan Bigg radar authored

Showing 1 changed file with 28 additions and 0 deletions. Show diff stats Hide diff stats

  1. +28 0 railties/guides/source/generators.textile
28 railties/guides/source/generators.textile
Source Rendered
@@ -423,6 +423,34 @@ Available options are:
423 423 * +:svn+ - Takes the path to the svn repository where this plugin can be found.
424 424 * +:revision+ - The revision of the plugin in an SVN repository.
425 425
  426 +h4. +gem+
  427 +
  428 +Specifies a gem dependency of the application.
  429 +
  430 +<ruby>
  431 + gem("rspec", :group => "test", :version => "2.1.0")
  432 + gem("devise", "1.1.5")
  433 +</ruby>
  434 +
  435 +Available options are:
  436 +
  437 +* +:group+ - The group in the +Gemfile+ where this gem should go.
  438 +* +:version+ - The version string of the gem you want to use. Can also be specified as the second argument to the method.
  439 +* +:git+ - The URL to the git repository for this gem.
  440 +
  441 +Any additional options passed to this method are put on the end of the line:
  442 +
  443 +<ruby>
  444 + gem("devise", :git => "git://github.com/plataformatec/devise", :branch => "master")
  445 +</ruby>
  446 +
  447 +The above code will put the following line into +Gemfile+:
  448 +
  449 +<ruby>
  450 + gem "devise", :git => "git://github.com/plataformatec/devise", :branch => "master"
  451 +</ruby>
  452 +
  453 +
426 454
427 455 h3. Changelog
428 456

0 comments on commit 77a2287

Please sign in to comment.
Something went wrong with that request. Please try again.