diff options
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/assertions.rb | 18 | ||||
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 22 | ||||
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 10 | ||||
-rw-r--r-- | actionpack/lib/action_controller/components.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/cookies.rb | 6 | ||||
-rw-r--r-- | actionpack/lib/action_controller/dependencies.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/filters.rb | 6 | ||||
-rw-r--r-- | actionpack/lib/action_controller/helpers.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/layout.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/rescue.rb | 2 |
10 files changed, 36 insertions, 36 deletions
diff --git a/actionpack/lib/action_controller/assertions.rb b/actionpack/lib/action_controller/assertions.rb index b29a2864a7..952cc683b2 100644 --- a/actionpack/lib/action_controller/assertions.rb +++ b/actionpack/lib/action_controller/assertions.rb @@ -8,9 +8,9 @@ module Test #:nodoc: # In addition to these specific assertions, you also have easy access to various collections that the regular test/unit assertions # can be used against. These collections are: # - # * assigns: Instance variables assigned in the action that's available for the view. + # * assigns: Instance variables assigned in the action that are available for the view. # * session: Objects being saved in the session. - # * flash: The flash objects being currently in the session. + # * flash: The flash objects currently in the session. # * cookies: Cookies being sent to the user on this request. # # These collections can be used just like any other hash: @@ -25,13 +25,13 @@ module Test #:nodoc: # # On top of the collections, you have the complete url that a given action redirected to available in redirect_to_url. # - # For redirects within the same controller, you can even call follow_redirect and the redirect will be follow triggering another + # For redirects within the same controller, you can even call follow_redirect and the redirect will be followed, triggering another # action call which can then be asserted against. # # == Manipulating the request collections # - # The collections described above link to the response, so you can test if what the actions were expected to do happen. But - # some times you also want to manipulate these collections in the request coming in. This is really only relevant for sessions + # The collections described above link to the response, so you can test if what the actions were expected to do happened. But + # sometimes you also want to manipulate these collections in the incoming request. This is really only relevant for sessions # and cookies, though. For sessions, you just do: # # @request.session[:key] = "value" @@ -68,7 +68,7 @@ module Test #:nodoc: end # Assert that the redirection options passed in match those of the redirect called in the latest action. This match can be partial, - # such at assert_redirected_to(:controller => "weblog") will also match the redirection of + # such that assert_redirected_to(:controller => "weblog") will also match the redirection of # redirect_to(:controller => "weblog", :action => "show") and so on. def assert_redirected_to(options = {}, message=nil) clean_backtrace do @@ -118,7 +118,7 @@ module Test #:nodoc: end end - # Asserts that the routing of the given path is handled correctly and that the parsed options match. + # Asserts that the routing of the given path was handled correctly and that the parsed options match. def assert_recognizes(expected_options, path, extras={}, message=nil) clean_backtrace do path = "/#{path}" unless path[0..0] == '/' @@ -159,8 +159,8 @@ module Test #:nodoc: end end - # asserts that path and options match both ways, in other words, the URL generated from - # options is same as path, and also that the options recognized from path are same as options + # Asserts that path and options match both ways; in other words, the URL generated from + # options is the same as path, and also that the options recognized from path are the same as options def assert_routing(path, options, defaults={}, extras={}, message=nil) assert_recognizes(options, path, extras, message) diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index b338904142..334dc1b4d5 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -89,7 +89,7 @@ module ActionController #:nodoc: # # == Parameters # - # All request parameters whether they come from a GET or POST request, or from the URL, are available through the params hash. + # All request parameters, whether they come from a GET or POST request, or from the URL, are available through the params hash. # So an action that was performed through /weblog/list?category=All&limit=5 will include { "category" => "All", "limit" => 5 } # in params. # @@ -165,7 +165,7 @@ module ActionController #:nodoc: # the post again, but rather just show it one more time. # # This sounds fairly simple, but the redirection is complicated by the quest for a phenomenon known as "pretty urls". Instead of accepting - # the dreadful beings that is "weblog_controller?action=show&post_id=5", Action Controller goes out of its way to represent the former as + # the dreadful being that is "weblog_controller?action=show&post_id=5", Action Controller goes out of its way to represent the former as # "/weblog/show/5". And this is even the simple case. As an example of a more advanced pretty url consider # "/library/books/ISBN/0743536703/show", which can be mapped to books_controller?action=show&type=ISBN&id=0743536703. # @@ -188,7 +188,7 @@ module ActionController #:nodoc: # # == Calling multiple redirects or renders # - # An action should conclude by a single render or redirect. Attempting to try to do either again will result in a DoubleRenderError: + # An action should conclude with a single render or redirect. Attempting to try to do either again will result in a DoubleRenderError: # # def do_something # redirect_to :action => "elsewhere" @@ -241,7 +241,7 @@ module ActionController #:nodoc: @@debug_routes = true cattr_accessor :debug_routes - # Controls whether the application is thread-safe, so multi-threaded servers like WEBrick knows whether to apply a mutex + # Controls whether the application is thread-safe, so multi-threaded servers like WEBrick know whether to apply a mutex # around the performance of each action. Action Pack and Active Record are by default thread-safe, but many applications # may not be. Turned off by default. @@allow_concurrency = false @@ -276,7 +276,7 @@ module ActionController #:nodoc: attr_accessor :response # Holds a hash of objects in the session. Accessed like <tt>session[:person]</tt> to get the object tied to the "person" - # key. The session will hold any type of object as values, but the key should be a string. + # key. The session will hold any type of object as values, but the key should be a string or symbol. attr_accessor :session # Holds a hash of header names and values. Accessed like <tt>headers["Cache-Control"]</tt> to get the value of the Cache-Control @@ -306,7 +306,7 @@ module ActionController #:nodoc: @controller_name ||= controller_class_name.sub(/Controller$/, '').underscore end - # Convert the class name from something like "OneModule::TwoModule::NeatController" to "one_module/two_module/neat". + # Converts the class name from something like "OneModule::TwoModule::NeatController" to "one_module/two_module/neat". def controller_path unless @controller_path components = self.name.to_s.split('::') @@ -373,7 +373,7 @@ module ActionController #:nodoc: # # <tt>url_for</tt> is used to: # - # All keys given to url_for are forwarded to the Route module save for the following: + # All keys given to url_for are forwarded to the Route module, save for the following: # * <tt>:anchor</tt> -- specifies the anchor name to be appended to the path. For example, # <tt>url_for :controller => 'posts', :action => 'show', :id => 10, :anchor => 'comments'</tt> # will produce "/posts/show/10#comments". @@ -408,7 +408,7 @@ module ActionController #:nodoc: # The final rule is applied while the URL is being generated and is best illustrated by an example. Let us consider the # route given by <tt>map.connect 'people/:last/:first/:action', :action => 'bio', :controller => 'people'</tt>. # - # Suppose that the current URL is "people/hh/david/contacts". Let's consider a few different cases URLs which are generated + # Suppose that the current URL is "people/hh/david/contacts". Let's consider a few different cases of URLs which are generated # from this page. # # * <tt>url_for :action => 'bio'</tt> -- During the generation of this URL, default values will be used for the first and @@ -436,7 +436,7 @@ module ActionController #:nodoc: # url_for :overwrite_params => { :action => 'print' } # # This takes the current URL as is and only exchanges the action. In contrast, <tt>url_for :action => 'print'</tt> - # would have slashed-off the path components are the changed action. + # would have slashed-off the path components after the changed action. def url_for(options = {}, *parameters_for_method_reference) #:doc: case options when String then options @@ -481,7 +481,7 @@ module ActionController #:nodoc: # # === Rendering partials # - # Partial rendering is most commonly used together with Ajax calls that only updates one or a few elements on a page + # Partial rendering is most commonly used together with Ajax calls that only update one or a few elements on a page # without reloading. Rendering of partials from the controller makes it possible to use the same partial template in # both the full-page rendering (by calling it from within the template) and when sub-page updates happen (from the # controller action responding to Ajax calls). By default, the current layout is not used. @@ -683,7 +683,7 @@ module ActionController #:nodoc: @performed_render = false end - # Clears the redirected results from the headers, resetting the status to 200 and returns + # Clears the redirected results from the headers, resets the status to 200 and returns # the URL that was used to redirect or nil if there was no redirected URL # Note that +redirect_to+ will change the body of the response to indicate a redirection. # The response body is not reset here, see +erase_render_results+ diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index 4c71632c4b..37b3557c5d 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -18,7 +18,7 @@ module ActionController #:nodoc: end # Page caching is an approach to caching where the entire action output of is stored as a HTML file that the web server - # can serve without going through the Action Pack. This can be as much as 100 times faster than going the process of dynamically + # can serve without going through the Action Pack. This can be as much as 100 times faster than going through the process of dynamically # generating the content. Unfortunately, this incredible speed-up is only available to stateless pages where all visitors # are treated the same. Content management systems -- including weblogs and wikis -- have many pages that are a great fit # for this approach, but account-based systems where people log in and manipulate their own data are often less likely candidates. @@ -140,7 +140,7 @@ module ActionController #:nodoc: # Action caching is similar to page caching by the fact that the entire output of the response is cached, but unlike page caching, # every request still goes through the Action Pack. The key benefit of this is that filters are run before the cache is served, which - # allows for authentication and other restrictions on whether someone are supposed to see the cache. Example: + # allows for authentication and other restrictions on whether someone is allowed to see the cache. Example: # # class ListsController < ApplicationController # before_filter :authenticate, :except => :public @@ -228,7 +228,7 @@ module ActionController #:nodoc: # In order to use the fragment caching, you need to designate where the caches should be stored. This is done by assigning a fragment store # of which there are four different kinds: # - # * FileStore: Keeps the fragments on disk in the +cache_path+, which works well for all types of environments and share the fragments for + # * FileStore: Keeps the fragments on disk in the +cache_path+, which works well for all types of environments and shares the fragments for # all the web server processes running off the same application directory. # * MemoryStore: Keeps the fragments in memory, which is fine for WEBrick and for FCGI (if you don't care that each FCGI process holds its # own fragment store). It's not suitable for CGI as the process is thrown away at the end of each request. It can potentially also take @@ -481,14 +481,14 @@ module ActionController #:nodoc: # end # end # - # The sweeper is assigned on the controllers that wish to have its job performed using the <tt>cache_sweeper</tt> class method: + # The sweeper is assigned in the controllers that wish to have its job performed using the <tt>cache_sweeper</tt> class method: # # class ListsController < ApplicationController # caches_action :index, :show, :public, :feed # cache_sweeper :list_sweeper, :only => [ :edit, :destroy, :share ] # end # - # In the example above, four actions are cached and three actions are responsible of expiring those caches. + # In the example above, four actions are cached and three actions are responsible for expiring those caches. module Sweeping def self.append_features(base) #:nodoc: super diff --git a/actionpack/lib/action_controller/components.rb b/actionpack/lib/action_controller/components.rb index 62f6ee518d..2d14d6c37f 100644 --- a/actionpack/lib/action_controller/components.rb +++ b/actionpack/lib/action_controller/components.rb @@ -1,5 +1,5 @@ module ActionController #:nodoc: - # Components allows you to call other actions for their rendered response while execution another action. You can either delegate + # Components allows you to call other actions for their rendered response while executing another action. You can either delegate # the entire response rendering or you can mix a partial response in with your other content. # # class WeblogController < ActionController::Base diff --git a/actionpack/lib/action_controller/cookies.rb b/actionpack/lib/action_controller/cookies.rb index ac96ed0e0c..5785805b2b 100644 --- a/actionpack/lib/action_controller/cookies.rb +++ b/actionpack/lib/action_controller/cookies.rb @@ -1,6 +1,6 @@ module ActionController #:nodoc: - # Cookies are read and written through ActionController#cookies. The cookies being read is what was received along with the request, - # the cookies being written is what will be sent out will the response. Cookies are read by value (so you won't get the cookie object + # Cookies are read and written through ActionController#cookies. The cookies being read are what were received along with the request, + # the cookies being written are what will be sent out with the response. Cookies are read by value (so you won't get the cookie object # itself back -- just the value it holds). Examples for writing: # # cookies[:user_name] = "david" # => Will set a simple session cookie @@ -43,7 +43,7 @@ module ActionController #:nodoc: update(@cookies) end - # Returns the value of the cookie by +name+ -- or nil if no such cookie exist. You set new cookies using either the cookie method + # Returns the value of the cookie by +name+ -- or nil if no such cookie exists. You set new cookies using either the cookie method # or cookies[]= (for simple name/value cookies without options). def [](name) @cookies[name.to_s].value.first if @cookies[name.to_s] && @cookies[name.to_s].respond_to?(:value) diff --git a/actionpack/lib/action_controller/dependencies.rb b/actionpack/lib/action_controller/dependencies.rb index 5132bccd62..c3a1da2701 100644 --- a/actionpack/lib/action_controller/dependencies.rb +++ b/actionpack/lib/action_controller/dependencies.rb @@ -27,7 +27,7 @@ module ActionController #:nodoc: # end # # Also note, that if the models follow the pattern of just 1 class per file in the form of MyClass => my_class.rb, then these - # classes doesn't have to be required as Active Support will auto-require them. + # classes don't have to be required as Active Support will auto-require them. module ClassMethods # Specifies a variable number of models that this controller depends on. Models are normally Active Record classes or a similar # backend for modelling entity classes. diff --git a/actionpack/lib/action_controller/filters.rb b/actionpack/lib/action_controller/filters.rb index bf4c16b89d..6bbb91ae8b 100644 --- a/actionpack/lib/action_controller/filters.rb +++ b/actionpack/lib/action_controller/filters.rb @@ -41,7 +41,7 @@ module ActionController #:nodoc: # # Now any actions performed on the BankController will have the audit method called before. On the VaultController, # first the audit method is called, then the verify_credentials method. If the audit method returns false, then - # verify_credentials and the intended action is never called. + # verify_credentials and the intended action are never called. # # == Filter types # @@ -74,7 +74,7 @@ module ActionController #:nodoc: # # As you can see, the block expects to be passed the controller after it has assigned the request to the internal variables. # This means that the block has access to both the request and response objects complete with convenience methods for params, - # session, template, and assigns. Note: The inline method doesn't strictly has to be a block. Any object that responds to call + # session, template, and assigns. Note: The inline method doesn't strictly have to be a block; any object that responds to call # and returns 1 or -1 on arity will do (such as a Proc or an Method object). # # == Filter chain ordering @@ -143,7 +143,7 @@ module ActionController #:nodoc: # end # end # - # When setting conditions on inline method (proc) filters the condition must come first and be placed in parenthesis. + # When setting conditions on inline method (proc) filters the condition must come first and be placed in parentheses. # # class UserPreferences < ActionController::Base # before_filter(:except => :new) { # some proc ... } diff --git a/actionpack/lib/action_controller/helpers.rb b/actionpack/lib/action_controller/helpers.rb index 422e075a8e..674c28e6c7 100644 --- a/actionpack/lib/action_controller/helpers.rb +++ b/actionpack/lib/action_controller/helpers.rb @@ -19,7 +19,7 @@ module ActionController #:nodoc: end end - # The template helpers serves to relieve the templates from including the same inline code again and again. It's a + # The template helpers serve to relieve the templates from including the same inline code again and again. It's a # set of standardized methods for working with forms (FormHelper), dates (DateHelper), texts (TextHelper), and # Active Records (ActiveRecordHelper) that's available to all templates by default. # diff --git a/actionpack/lib/action_controller/layout.rb b/actionpack/lib/action_controller/layout.rb index c7f3420a6e..32f7864182 100644 --- a/actionpack/lib/action_controller/layout.rb +++ b/actionpack/lib/action_controller/layout.rb @@ -24,7 +24,7 @@ module ActionController #:nodoc: # and if you ever want to change the structure of these two includes, you'll have to change all the templates. # # With layouts, you can flip it around and have the common structure know where to insert changing content. This means - # that the header and footer is only mentioned in one place, like this: + # that the header and footer are only mentioned in one place, like this: # # <!-- The header part of this layout --> # <%= @content_for_layout %> diff --git a/actionpack/lib/action_controller/rescue.rb b/actionpack/lib/action_controller/rescue.rb index c70357a500..104823ebcc 100644 --- a/actionpack/lib/action_controller/rescue.rb +++ b/actionpack/lib/action_controller/rescue.rb @@ -56,7 +56,7 @@ module ActionController #:nodoc: end end - # Overwrite to expand the meaning of a local request in order to show local rescues on other occurences than + # Overwrite to expand the meaning of a local request in order to show local rescues on other occurrences than # the remote IP being 127.0.0.1. For example, this could include the IP of the developer machine when debugging # remotely. def local_request? #:doc: |