Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7383

Show
Ignore:
Timestamp:
08/31/07 19:07:42 (1 year ago)
Author:
bitsweat
Message:

Documentation tweaks and fixes. Closes #9454 [sur, kampers]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/assertions.rb

    r6056 r7383  
    4040  # == Testing named routes 
    4141  # 
    42   # If you're using named routes, they can be easily tested using the original named routes methods straight in the test case. 
     42  # If you're using named routes, they can be easily tested using the original named routes' methods straight in the test case. 
    4343  # Example: 
    4444  # 
  • trunk/actionpack/lib/action_controller/cookies.rb

    r7160 r7383  
    4545    end 
    4646 
    47     # Returns the value of the cookie by +name+ -- or nil if no such cookie exists. You set new cookies using either the cookie method 
    48     # or cookies[]= (for simple name/value cookies without options). 
     47    # Returns the value of the cookie by +name+ -- or nil if no such cookie exists. You set new cookies using cookies[]= 
     48    # (for simple name/value cookies without options). 
    4949    def [](name) 
    5050      @cookies[name.to_s].value.first if @cookies[name.to_s] && @cookies[name.to_s].respond_to?(:value) 
  • trunk/actionpack/lib/action_controller/flash.rb

    r6887 r7383  
    9797      end 
    9898     
    99       # Marks the entire flash or a single flash entry to be discarded by the end of the current action 
     99      # Marks the entire flash or a single flash entry to be discarded by the end of the current action: 
    100100      # 
    101101      #     flash.discard              # discard the entire flash at the end of the current action 
  • trunk/actionpack/lib/action_controller/helpers.rb

    r7363 r7383  
    2020 
    2121    # The Rails framework provides a large number of helpers for working with +assets+, +dates+, +forms+,  
    22     # +numbers+ and <tt>Active Record objects</tt>, to name a few. These helpers are available to all templates 
     22    # +numbers+ and +ActiveRecord+ objects, to name a few. These helpers are available to all templates 
    2323    # by default. 
    2424    # 
     
    2626    # extract complicated logic or reusable functionality is strongly encouraged.  By default, the controller will  
    2727    # include a helper whose name matches that of the controller, e.g., <tt>MyController</tt> will automatically 
    28     # include <tt>MyHelper</tt>.   
     28    # include <tt>MyHelper</tt>. 
    2929    #  
    3030    # Additional helpers can be specified using the +helper+ class method in <tt>ActionController::Base</tt> or any 
    31     # controller which inherits from it.   
     31    # controller which inherits from it. 
    3232    # 
    3333    # ==== Examples 
     
    8989      # 
    9090      # When the argument is the symbol <tt>:all</tt>, the controller will includes all helpers from  
    91       # <tt>app/views/helpers/**/*.rb</tt> under RAILS_ROOT 
     91      # <tt>app/views/helpers/**/*.rb</tt> under +RAILS_ROOT+. 
    9292      #   helper :all 
    9393      # 
     
    103103      #   end 
    104104      #  
    105       # Finally, all the above styles can be mixed together, and the helper method can be invokved with a mix of 
     105      # Finally, all the above styles can be mixed together, and the +helper+ method can be invokved with a mix of 
    106106      # +symbols+, +strings+, +modules+ and blocks. 
    107107      #   helper(:three, BlindHelper) { def mice() 'mice' end } 
     
    140140      end 
    141141 
    142       # Declare a controller method as a helper.  For example, 
     142      # Declare a controller method as a helper. For example, the following 
     143      # makes the +current_user+ controller method available to the view: 
    143144      #   class ApplicationController < ActionController::Base 
    144145      #     helper_method :current_user 
     
    147148      #     end 
    148149      #   end 
    149       # makes the +current_user+ controller method available in the view. 
    150150      def helper_method(*methods) 
    151151        methods.flatten.each do |method| 
     
    158158      end 
    159159 
    160       # Declare a controller attribute as a helper.  For example, 
     160      # Declares helper accessors for controller attributes. For example, the 
     161      # following adds new +name+ and <tt>name=</tt> instance methods to a 
     162      # controller and makes them available to the view: 
    161163      #   helper_attr :name 
    162164      #   attr_accessor :name 
    163       # makes the name and name= controller methods available in the view. 
    164       # The is a convenience wrapper for helper_method. 
    165165      def helper_attr(*attrs) 
    166166        attrs.flatten.each { |attr| helper_method(attr, "#{attr}=") } 
  • trunk/actionpack/lib/action_controller/integration.rb

    r6816 r7383  
    5252      attr_reader :response 
    5353 
    54       # Create an initialize a new Session instance. 
     54      # Create and initialize a new +Session+ instance. 
    5555      def initialize 
    5656        reset!