diff options
-rw-r--r-- | actionpack/CHANGELOG.md | 2 | ||||
-rw-r--r-- | activemodel/README.rdoc | 4 | ||||
-rw-r--r-- | activemodel/lib/active_model/model.rb | 6 | ||||
-rw-r--r-- | railties/guides/source/api_app.textile | 2 | ||||
-rw-r--r-- | railties/guides/source/routing.textile | 1 |
5 files changed, 9 insertions, 6 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 96ad3a155c..869d4704dd 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,5 +1,7 @@ ## Rails 4.0.0 (unreleased) ## +* Allows the route helper `root` to take a string argument. For example, `root 'pages#main'`. *bcardarella* + * Forms of persisted records use always PATCH (via the `_method` hack). *fxn* * For resources, both PATCH and PUT are routed to the `update` action. *fxn* diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc index 9b121510a9..4861b0a002 100644 --- a/activemodel/README.rdoc +++ b/activemodel/README.rdoc @@ -28,8 +28,8 @@ to integrate with Action Pack out of the box: +ActiveModel::Model+. person.age # => 18 person.valid? # => false -It includes model name instrospection, conversions, translations and -validations, resulting in a class suitable to be used with ActionPack. +It includes model name introspections, conversions, translations and +validations, resulting in a class suitable to be used with Action Pack. See +ActiveModel::Model+ for more examples. Active Model also provides the following functionality to have ORM-like diff --git a/activemodel/lib/active_model/model.rb b/activemodel/lib/active_model/model.rb index 8445113b64..6825fdc653 100644 --- a/activemodel/lib/active_model/model.rb +++ b/activemodel/lib/active_model/model.rb @@ -3,8 +3,8 @@ module ActiveModel # == Active Model Basic Model # # Includes the required interface for an object to interact with +ActionPack+, - # using different +ActiveModel+ modules. It includes model name instrospection, - # conversions, translations and validations . Besides that, it allows you to + # using different +ActiveModel+ modules. It includes model name introspections, + # conversions, translations and validations. Besides that, it allows you to # initialize the object with a hash of attributes, pretty much like # +ActiveRecord+ does. # @@ -51,7 +51,7 @@ module ActiveModel # person = Person.new(:id => 1, :name => 'bob') # person.omg # => true # - # For more detailed information on other functionality available, please refer + # For more detailed information on other functionalities available, please refer # to the specific modules included in +ActiveModel::Model+ (see below). module Model def self.included(base) diff --git a/railties/guides/source/api_app.textile b/railties/guides/source/api_app.textile index 69e6592aed..d51fcb2d58 100644 --- a/railties/guides/source/api_app.textile +++ b/railties/guides/source/api_app.textile @@ -117,7 +117,7 @@ An API application comes with the following middlewares by default. * +ActionDispatch::Reloader+: In development mode, support code reloading. * +ActionDispatch::ParamsParser+: Parse XML, YAML and JSON parameters when the request's +Content-Type+ is one of those. * +ActionDispatch::Head+: Dispatch +HEAD+ requests as +GET+ requests, and return only the status code and headers. -* +Rack::ConditionalGet+: Supports the the +stale?+ feature in Rails controllers. +* +Rack::ConditionalGet+: Supports the +stale?+ feature in Rails controllers. * +Rack::ETag+: Automatically set an +ETag+ on all string responses. This means that if the same response is returned from a controller for the same URL, the server will return a +304 Not Modified+, even if no additional caching steps are taken. This is primarily a client-side optimization; it reduces bandwidth costs but not server processing time. Other plugins, including +ActiveRecord+, may add additional middlewares. In general, these middlewares are agnostic to the type of app you are building, and make sense in an API-only Rails application. diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile index 42665114be..c5567b3350 100644 --- a/railties/guides/source/routing.textile +++ b/railties/guides/source/routing.textile @@ -622,6 +622,7 @@ You can specify what Rails should route +"/"+ to with the +root+ method: <ruby> root :to => 'pages#main' +root 'pages#main' # shortcut for the above </ruby> You should put the +root+ route at the top of the file, because it is the most popular route and should be matched first. You also need to delete the +public/index.html+ file for the root route to take effect. |