aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/generators.textile
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2010-12-01 17:18:41 +1100
committerRyan Bigg <radarlistener@gmail.com>2010-12-01 17:18:41 +1100
commit77a228785ccc6832d8e30438380aea7ad9706a70 (patch)
treefb914032e3c9f60575fadd41b7a0d1ff6b0af8e4 /railties/guides/source/generators.textile
parent74e178880c56bae86958e6e39be1c35532399bb3 (diff)
downloadrails-77a228785ccc6832d8e30438380aea7ad9706a70.tar.gz
rails-77a228785ccc6832d8e30438380aea7ad9706a70.tar.bz2
rails-77a228785ccc6832d8e30438380aea7ad9706a70.zip
Add gem method documentation to the generators guide
Diffstat (limited to 'railties/guides/source/generators.textile')
-rw-r--r--railties/guides/source/generators.textile28
1 files changed, 28 insertions, 0 deletions
diff --git a/railties/guides/source/generators.textile b/railties/guides/source/generators.textile
index c57171f189..915270ff46 100644
--- a/railties/guides/source/generators.textile
+++ b/railties/guides/source/generators.textile
@@ -423,6 +423,34 @@ Available options are:
* +:svn+ - Takes the path to the svn repository where this plugin can be found.
* +:revision+ - The revision of the plugin in an SVN repository.
+h4. +gem+
+
+Specifies a gem dependency of the application.
+
+<ruby>
+ gem("rspec", :group => "test", :version => "2.1.0")
+ gem("devise", "1.1.5")
+</ruby>
+
+Available options are:
+
+* +:group+ - The group in the +Gemfile+ where this gem should go.
+* +:version+ - The version string of the gem you want to use. Can also be specified as the second argument to the method.
+* +:git+ - The URL to the git repository for this gem.
+
+Any additional options passed to this method are put on the end of the line:
+
+<ruby>
+ gem("devise", :git => "git://github.com/plataformatec/devise", :branch => "master")
+</ruby>
+
+The above code will put the following line into +Gemfile+:
+
+<ruby>
+ gem "devise", :git => "git://github.com/plataformatec/devise", :branch => "master"
+</ruby>
+
+
h3. Changelog