diff options
author | Xavier Noria <fxn@hashref.com> | 2011-07-23 12:14:10 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-07-23 12:14:10 +0200 |
commit | 38310ab1a6f559860e25b0e28bef9560bb452ae6 (patch) | |
tree | 7bba14b20d2870d8aebd3b6f52f458a77e6787b6 /railties/lib/rails | |
parent | 2db9a7e930f44aeeda175458a475911c2fa33f40 (diff) | |
download | rails-38310ab1a6f559860e25b0e28bef9560bb452ae6.tar.gz rails-38310ab1a6f559860e25b0e28bef9560bb452ae6.tar.bz2 rails-38310ab1a6f559860e25b0e28bef9560bb452ae6.zip |
little details seen while doing a pass through what's new in docrails
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/engine.rb | 3 | ||||
-rw-r--r-- | railties/lib/rails/paths.rb | 16 |
2 files changed, 10 insertions, 9 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index b5b4c2becc..cb897e94d7 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -5,7 +5,7 @@ require 'rbconfig' require 'rails/engine/railties' module Rails - # Rails::Engine allows you to wrap a specific Rails application or subset of + # <tt>Rails::Engine</tt> allows you to wrap a specific Rails application or subset of # functionality and share it with other applications. Since Rails 3.0, every # <tt>Rails::Application</tt> is just an engine, which allows for simple # feature and application sharing. @@ -176,6 +176,7 @@ module Rails # == Engine name # # There are some places where an Engine's name is used: + # # * routes: when you mount an Engine with <tt>mount(MyEngine::Engine => '/my_engine')</tt>, # it's used as default :as option # * some of the rake tasks are based on engine name, e.g. <tt>my_engine:install:migrations</tt>, diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb index 6aecebe273..daa1bdfc29 100644 --- a/railties/lib/rails/paths.rb +++ b/railties/lib/rails/paths.rb @@ -2,7 +2,7 @@ require 'set' module Rails module Paths - # This object is an extended hash that behaves as root of the Rails::Paths system. + # This object is an extended hash that behaves as root of the <tt>Rails::Paths</tt> system. # It allows you to collect information about how you want to structure your application # paths by a Hash like API. It requires you to give a physical path on initialization. # @@ -10,13 +10,13 @@ module Rails # root.add "app/controllers", :eager_load => true # # The command above creates a new root object and add "app/controllers" as a path. - # This means we can get a Path object back like below: + # This means we can get a +Rails::Paths::Path+ object back like below: # # path = root["app/controllers"] # path.eager_load? # => true # path.is_a?(Rails::Paths::Path) # => true # - # The Path object is simply an array and allows you to easily add extra paths: + # The +Path+ object is simply an array and allows you to easily add extra paths: # # path.is_a?(Array) # => true # path.inspect # => ["app/controllers"] @@ -24,17 +24,17 @@ module Rails # path << "lib/controllers" # path.inspect # => ["app/controllers", "lib/controllers"] # - # Notice that when you add a path using #add, the path object created already - # contains the path with the same path value given to #add. In some situations, + # Notice that when you add a path using +add+, the path object created already + # contains the path with the same path value given to +add+. In some situations, # you may not want this behavior, so you can give :with as option. # # root.add "config/routes", :with => "config/routes.rb" # root["config/routes"].inspect # => ["config/routes.rb"] # - # The #add method accepts the following options as arguments: + # The +add+ method accepts the following options as arguments: # eager_load, autoload, autoload_once and glob. # - # Finally, the Path object also provides a few helpers: + # Finally, the +Path+ object also provides a few helpers: # # root = Root.new "/rails" # root.add "app/controllers" @@ -42,7 +42,7 @@ module Rails # root["app/controllers"].expanded # => ["/rails/app/controllers"] # root["app/controllers"].existent # => ["/rails/app/controllers"] # - # Check the Path documentation for more information. + # Check the <tt>Rails::Paths::Path</tt> documentation for more information. class Root < ::Hash attr_accessor :path |