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

Ticket #10378: doc_typos.diff

File doc_typos.diff, 22.6 kB (added by hasmanyjosh, 10 months ago)
  • actionmailer/Rakefile

    old new  
    2929} 
    3030 
    3131 
    32 # Genereate the RDoc documentation 
     32# Generate the RDoc documentation 
    3333Rake::RDocTask.new { |rdoc| 
    3434  rdoc.rdoc_dir = 'doc' 
    3535  rdoc.title    = "Action Mailer -- Easy email delivery and testing" 
  • activesupport/test/multibyte_handler_test.rb

    old new  
    6969    assert_raise(ActiveSupport::Multibyte::Handlers::EncodingError) { @handler.normalize(@bytestring) } 
    7070  end 
    7171   
    72   # Test for the Public Review Issue #29, bad explaination of composition might lead to a 
     72  # Test for the Public Review Issue #29, bad explanation of composition might lead to a 
    7373  # bad implementation: http://www.unicode.org/review/pr-29.html 
    7474  def test_normalization_C_pri_29 
    7575    [ 
  • activesupport/lib/active_support/core_ext/array/conversions.rb

    old new  
    44  module CoreExtensions #:nodoc: 
    55    module Array #:nodoc: 
    66      module Conversions 
    7         # Converts the array to comma-seperated sentence where the last element is joined by the connector word. Options: 
     7        # Converts the array to a comma-separated sentence where the last element is joined by the connector word. Options: 
    88        # * <tt>:connector</tt> - The word used to join the last element in arrays with two or more elements (default: "and") 
    99        # * <tt>:skip_last_comma</tt> - Set to true to return "a, b and c" instead of "a, b, and c". 
    1010        def to_sentence(options = {}) 
  • activerecord/test/validations_test.rb

    old new  
    367367    assert !r2.valid?, "Saving r2" 
    368368 
    369369    # Should succeed as validates_uniqueness_of only applies to 
    370     # UniqueReply and it's subclasses 
     370    # UniqueReply and its subclasses 
    371371    r3 = t.replies.create "title" => "r2", "content" => "a barrel of fun" 
    372372    assert r3.valid?, "Saving r3" 
    373373  end 
  • activerecord/lib/active_record/callbacks.rb

    old new  
    164164  # If <tt>Base#save!</tt> is called it will raise a +RecordNotSaved+ exception. 
    165165  # Nothing will be appended to the errors object. 
    166166  # 
    167   # == Cancelling callbacks 
     167  # == Canceling callbacks 
    168168  # 
    169169  # If a <tt>before_*</tt> callback returns +false+, all the later callbacks and the associated action are cancelled. If an <tt>after_*</tt> callback returns 
    170170  # +false+, all the later callbacks are cancelled. Callbacks are generally run in the order they are defined, with the exception of callbacks 
  • activerecord/lib/active_record/attribute_methods.rb

    old new  
    7979        end 
    8080      end 
    8181 
    82       # Check to see if the method is defined in the model or any of it's subclasses that also derive from ActiveRecord. 
     82      # Check to see if the method is defined in the model or any of its subclasses that also derive from ActiveRecord. 
    8383      # Raise DangerousAttributeError if the method is defined by ActiveRecord though. 
    8484      def instance_method_already_implemented?(method_name) 
    8585        return true if method_name =~ /^id(=$|\?$|$)/ 
  • activerecord/lib/active_record/associations/has_many_through_association.rb

    old new  
    120120      def count(*args) 
    121121        column_name, options = @reflection.klass.send(:construct_count_options_from_args, *args) 
    122122        if @reflection.options[:uniq] 
    123           # This is needed becase 'SELECT count(DISTINCT *)..' is not valid sql statement. 
     123          # This is needed because 'SELECT count(DISTINCT *)..' is not valid sql statement. 
    124124          column_name = "#{@reflection.klass.table_name}.#{@reflection.klass.primary_key}" if column_name == :all 
    125125          options.merge!(:distinct => true)  
    126126        end 
  • activerecord/lib/active_record/associations.rb

    old new  
    266266    # 
    267267    # === Association callbacks 
    268268    # 
    269     # Similiar to the normal callbacks that hook into the lifecycle of an Active Record object, you can also define callbacks that get 
     269    # Similar to the normal callbacks that hook into the lifecycle of an Active Record object, you can also define callbacks that get 
    270270    # triggered when you add an object to or remove an object from an association collection. Example: 
    271271    # 
    272272    #   class Project 
  • activerecord/lib/active_record/base.rb

    old new  
    169169  #   anonymous = User.new(:name => "") 
    170170  #   anonymous.name? # => false 
    171171  # 
    172   # == Accessing attributes before they have been typecasted 
     172  # == Accessing attributes before they have been typecast 
    173173  # 
    174174  # Sometimes you want to be able to read the raw attribute data without having the column-determined typecast run its course first. 
    175175  # That can be done by using the <attribute>_before_type_cast accessors that all attributes have. For example, if your Account model 
  • activerecord/lib/active_record/aggregations.rb

    old new  
    123123      #   This defaults to +false+. 
    124124      # 
    125125      # An optional block can be passed to convert the argument that is passed to the writer method into an instance of 
    126       # <tt>:class_name</tt>. The block will only be called if the arguement is not already an instance of <tt>:class_name</tt>. 
     126      # <tt>:class_name</tt>. The block will only be called if the argument is not already an instance of <tt>:class_name</tt>. 
    127127      # 
    128128      # Option examples: 
    129129      #   composed_of :temperature, :mapping => %w(reading celsius) 
  • actionpack/test/controller/test_test.rb

    old new  
    214214  def test_assert_tag_descendant 
    215215    process :test_html_output 
    216216 
    217     # there is a tag with a decendant 'li' tag 
     217    # there is a tag with a descendant 'li' tag 
    218218    assert_tag :descendant => { :tag => "li" } 
    219219    # there is no tag with a descendant 'html' tag 
    220220    assert_no_tag :descendant => { :tag => "html" } 
  • actionpack/test/controller/routing_test.rb

    old new  
    882882  end 
    883883   
    884884  def test_build_pattern_non_optional_with_no_captures 
    885     # Non optioan
     885    # Non optiona
    886886    a_segment = ROUTING::DynamicSegment.new 
    887887    a_segment.regexp = /\d+/ #number_of_captures is 0 
    888888    assert_equal "(\\d+)stuff", a_segment.build_pattern('stuff') 
    889889  end 
    890890 
    891891  def test_build_pattern_non_optional_with_captures 
    892     # Non optioan
     892    # Non optiona
    893893    a_segment = ROUTING::DynamicSegment.new 
    894894    a_segment.regexp = /(\d+)(.*?)/ #number_of_captures is 2 
    895895    assert_equal "((\\d+)(.*?))stuff", a_segment.build_pattern('stuff') 
  • actionpack/test/controller/selector_test.rb

    old new  
    8585    assert_equal 2, @matches.size 
    8686    assert_equal "2", @matches[0].attributes["id"] 
    8787    assert_equal "3", @matches[1].attributes["id"] 
    88     # Match alement with attribute value. 
     88    # Match element with attribute value. 
    8989    select("*[title=foo]") 
    9090    assert_equal 1, @matches.size 
    9191    assert_equal "3", @matches[0].attributes["id"] 
    92     # Match alement with attribute and attribute value. 
     92    # Match element with attribute and attribute value. 
    9393    select("[bar=foo][title]") 
    9494    assert_equal 1, @matches.size 
    9595    assert_equal "2", @matches[0].attributes["id"] 
  • actionpack/lib/action_controller/routing_optimisation.rb

    old new  
    88    # :requirements, we can just build up a string and return it. 
    99    #  
    1010    # To support building optimisations for other common cases, the  
    11     # generation code is seperated into several classes  
     11    # generation code is separated into several classes  
    1212    module Optimisation 
    1313      def generate_optimisation_block(route, kind) 
    1414        return "" unless route.optimise? 
  • actionpack/lib/action_controller/assertions.rb

    old new  
    1616  #   assert flash.empty? # makes sure that there's nothing in the flash 
    1717  # 
    1818  # For historic reasons, the assigns hash uses string-based keys. So assigns[:person] won't work, but assigns["person"] will. To 
    19   # appease our yearning for symbols, though, an alternative accessor has been deviced using a method call instead of index referencing. 
     19  # appease our yearning for symbols, though, an alternative accessor has been devised using a method call instead of index referencing. 
    2020  # So assigns(:person) will work just like assigns["person"], but again, assigns[:person] will not work. 
    2121  # 
    2222  # On top of the collections, you have the complete url that a given action redirected to available in redirect_to_url. 
  • actionpack/lib/action_controller/base.rb

    old new  
    164164  # For removing objects from the session, you can either assign a single key to nil, like <tt>session[:person] = nil</tt>, or you can 
    165165  # remove the entire session with reset_session. 
    166166  # 
    167   # Sessions are stored in a browser cookie that's crytographically signed, but unencrypted, by default. This prevents 
     167  # Sessions are stored in a browser cookie that's cryptographically signed, but unencrypted, by default. This prevents 
    168168  # the user from tampering with the session but also allows him to see its contents. 
    169169  # 
    170170  # Do not put secret information in session! 
     
    293293    # The param_parsers hash lets you register handlers which will process the http body and add parameters to the 
    294294    # <tt>params</tt> hash. These handlers are invoked for post and put requests. 
    295295    # 
    296     # By default application/xml is enabled. A XmlSimple class with the same param name as the root will be instanciated 
     296    # By default application/xml is enabled. A XmlSimple class with the same param name as the root will be instantiated 
    297297    # in the <tt>params</tt>. This allows XML requests to mask themselves as regular form submissions, so you can have one 
    298298    # action serve both regular forms and web service requests. 
    299299    # 
     
    454454        view_paths.push(*path) 
    455455      end 
    456456       
    457       # Replace sensitive paramater data from the request log. 
    458       # Filters paramaters that have any of the arguments as a substring. 
     457      # Replace sensitive parameter data from the request log. 
     458      # Filters parameters that have any of the arguments as a substring. 
    459459      # Looks in all subhashes of the param hash for keys to filter. 
    460       # If a block is given, each key and value of the paramater hash and all 
     460      # If a block is given, each key and value of the parameter hash and all 
    461461      # subhashes is passed to it, the value or key 
    462462      # can be replaced using String#replace or similar method. 
    463463      # 
     
    590590      # However, you might ask why the action from the current request, 'contacts', isn't carried over into the new URL. The 
    591591      # answer has to do with the order in which the parameters appear in the generated path. In a nutshell, since the 
    592592      # value that appears in the slot for <tt>:first</tt> is not equal to default value for <tt>:first</tt> we stop using 
    593       # defaults. On it's own, this rule can account for much of the typical Rails URL behavior. 
     593      # defaults. On its own, this rule can account for much of the typical Rails URL behavior. 
    594594      #   
    595595      # Although a convenience, defaults can occasionally get in your way. In some cases a default persists longer than desired. 
    596596      # The default may be cleared by adding <tt>:name => nil</tt> to <tt>url_for</tt>'s options. 
  • actionpack/lib/action_controller/layout.rb

    old new  
    7070    # no layout explicitly assigned with the +layout+ method. Nested controllers use the same folder structure for automatic layout. 
    7171    # assignment. So an Admin::WeblogController will look for a template named <tt>app/views/layouts/admin/weblog.erb</tt>. 
    7272    # Setting a layout explicitly will always override the automatic behaviour for the controller where the layout is set. 
    73     # Explicitly setting the layout in a parent class, though, will not override the child class's layout assignement if the child 
     73    # Explicitly setting the layout in a parent class, though, will not override the child class's layout assignment if the child 
    7474    # class has a layout with the same name.  
    7575    # 
    7676    # == Inheritance for layouts 
  • actionpack/lib/action_controller/rescue.rb

    old new  
    227227          # assume they should exist at this point. An early raised exception 
    228228          # could trigger some other handler and the array could include 
    229229          # precisely a string whose corresponding constant has not yet been 
    230           # seen. This is why we are tolerant to unkown constants. 
     230          # seen. This is why we are tolerant to unknown constants. 
    231231          # 
    232232          # Note that this tolerance only matters if the exception was given as 
    233233          # a string, otherwise a NameError will be raised by the interpreter 
  • actionpack/lib/action_view/helpers/number_helper.rb

    old new  
    2121      #  number_to_phone(1235551234, :area_code => true, :extension => 555) # => (123) 555-1234 x 555 
    2222      #  number_to_phone(1235551234, :country_code => 1)                    # => +1-123-555-1234 
    2323      # 
    24       #  number_to_phone(1235551234, :country_code => 1, :extension => 1343, :delimeter => ".") 
     24      #  number_to_phone(1235551234, :country_code => 1, :extension => 1343, :delimiter => ".") 
    2525      #  => +1.123.555.1234 x 1343       
    2626      def number_to_phone(number, options = {}) 
    2727        number       = number.to_s.strip unless number.nil? 
  • actionpack/lib/action_view/helpers/url_helper.rb

    old new  
    331331      # also used as the name of the link unless +name+ is specified. Additional 
    332332      # HTML attributes for the link can be passed in +html_options+. 
    333333      # 
    334       # mail_to has several methods for hindering email harvestors and customizing 
     334      # mail_to has several methods for hindering email harvesters and customizing 
    335335      # the email itself by passing special keys to +html_options+. 
    336336      # 
    337337      # ==== Options 
  • actionpack/lib/action_view/helpers/asset_tag_helper.rb

    old new  
    356356      # 
    357357      # ==== Options 
    358358      # You can add HTML attributes using the +options+. The +options+ supports 
    359       # three additional keys for convienence and conformance: 
     359      # three additional keys for convenience and conformance: 
    360360      # 
    361361      # * <tt>:alt</tt>  - If no alt text is given, the file name part of the 
    362362      #   +source+ is used (capitalized and without the extension) 
  • actionpack/lib/action_view/helpers/date_helper.rb

    old new  
    213213      # Returns a set of html select-tags (one for year, month, day, hour, and minute) pre-selected with the +datetime+. 
    214214      # It's also possible to explicitly set the order of the tags using the <tt>:order</tt> option with an array of 
    215215      # symbols <tt>:year</tt>, <tt>:month</tt> and <tt>:day</tt> in the desired order. If you do not supply a Symbol, it 
    216       # will be appened onto the <tt>:order</tt> passed in. You can also add <tt>:date_separator</tt> and <tt>:time_separator</tt> 
     216      # will be appended onto the <tt>:order</tt> passed in. You can also add <tt>:date_separator</tt> and <tt>:time_separator</tt> 
    217217      # keys to the +options+ to control visual display of the elements. 
    218218      # 
    219219      # ==== Examples 
     
    226226      #   select_datetime() 
    227227      # 
    228228      #   # Generates a datetime select that defaults to the datetime in my_date_time (four days after today) 
    229       #   # with the fields ordered year, month, day rather then month, day, year. 
     229      #   # with the fields ordered year, month, day rather than month, day, year. 
    230230      #   select_datetime(my_date_time, :order => [:year, :month, :day]) 
    231231      # 
    232232      #   # Generates a datetime select that defaults to the datetime in my_date_time (four days after today) 
     
    249249      # Returns a set of html select-tags (one for year, month, and day) pre-selected with the +date+. 
    250250      # It's possible to explicitly set the order of the tags using the <tt>:order</tt> option with an array of 
    251251      # symbols <tt>:year</tt>, <tt>:month</tt> and <tt>:day</tt> in the desired order. If you do not supply a Symbol, it 
    252       # will be appened onto the <tt>:order</tt> passed in. 
     252      # will be appended onto the <tt>:order</tt> passed in. 
    253253      # 
    254254      # ==== Examples 
    255255      #   my_date = Time.today + 6.days 
     
    261261      #   select_date() 
    262262      # 
    263263      #   # Generates a date select that defaults to the date in my_date (six days after today) 
    264       #   # with the fields ordered year, month, day rather then month, day, year. 
     264      #   # with the fields ordered year, month, day rather than month, day, year. 
    265265      #   select_date(my_date, :order => [:year, :month, :day]) 
    266266      # 
    267267      #   # Generates a date select that discards the type of the field and defaults to the date in  
  • railties/test/generators/generator_test_helper.rb

    old new  
    11module GeneratorTestHelper 
    2   # Instatiates the Generator 
     2  # Instantiates the Generator 
    33  def build_generator(name,params) 
    44    Rails::Generator::Base.instance(name,params) 
    55  end 
  • railties/lib/initializer.rb

    old new  
    176176    # 
    177177    # In the default implementation, as each plugin discovered in <tt>plugin_paths</tt> is initialized: 
    178178    # * its +lib+ directory, if present, is added to the load path (immediately after the applications lib directory) 
    179     # * <tt>init.rb</tt> is evalutated, if present 
     179    # * <tt>init.rb</tt> is evaluated, if present 
    180180    # 
    181181    # After all plugins are loaded, duplicates are removed from the load path. 
    182182    # If an array of plugin names is specified in config.plugins, only those plugins will be loaded 
     
    217217      end 
    218218    end 
    219219 
    220     # This initialzation sets $KCODE to 'u' to enable the multibyte safe operations. 
     220    # This initialization sets $KCODE to 'u' to enable the multibyte safe operations. 
    221221    # Plugin authors supporting other encodings should override this behaviour and 
    222222    # set the relevant +default_charset+ on ActionController::Base 
    223223    def initialize_encoding 
  • railties/lib/rails/plugin/loader.rb

    old new  
    1010      # all plugins, and adds all plugin load paths, when it is created. The plugins 
    1111      # are then fully loaded (init.rb is evaluated) when load_plugins is called. 
    1212      # 
    13       # It is the loader's responsibilty to ensure that only the plugins specified 
     13      # It is the loader's responsibility to ensure that only the plugins specified 
    1414      # in the configuration are actually loaded, and that the order defined 
    1515      # is respected. 
    1616      def initialize(initializer)