Ticket #10378: doc_typos.diff
| File doc_typos.diff, 22.6 kB (added by hasmanyjosh, 10 months ago) |
|---|
-
actionmailer/Rakefile
old new 29 29 } 30 30 31 31 32 # Gener eate the RDoc documentation32 # Generate the RDoc documentation 33 33 Rake::RDocTask.new { |rdoc| 34 34 rdoc.rdoc_dir = 'doc' 35 35 rdoc.title = "Action Mailer -- Easy email delivery and testing" -
activesupport/test/multibyte_handler_test.rb
old new 69 69 assert_raise(ActiveSupport::Multibyte::Handlers::EncodingError) { @handler.normalize(@bytestring) } 70 70 end 71 71 72 # Test for the Public Review Issue #29, bad expla ination of composition might lead to a72 # Test for the Public Review Issue #29, bad explanation of composition might lead to a 73 73 # bad implementation: http://www.unicode.org/review/pr-29.html 74 74 def test_normalization_C_pri_29 75 75 [ -
activesupport/lib/active_support/core_ext/array/conversions.rb
old new 4 4 module CoreExtensions #:nodoc: 5 5 module Array #:nodoc: 6 6 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: 8 8 # * <tt>:connector</tt> - The word used to join the last element in arrays with two or more elements (default: "and") 9 9 # * <tt>:skip_last_comma</tt> - Set to true to return "a, b and c" instead of "a, b, and c". 10 10 def to_sentence(options = {}) -
activerecord/test/validations_test.rb
old new 367 367 assert !r2.valid?, "Saving r2" 368 368 369 369 # Should succeed as validates_uniqueness_of only applies to 370 # UniqueReply and it 's subclasses370 # UniqueReply and its subclasses 371 371 r3 = t.replies.create "title" => "r2", "content" => "a barrel of fun" 372 372 assert r3.valid?, "Saving r3" 373 373 end -
activerecord/lib/active_record/callbacks.rb
old new 164 164 # If <tt>Base#save!</tt> is called it will raise a +RecordNotSaved+ exception. 165 165 # Nothing will be appended to the errors object. 166 166 # 167 # == Cancel ling callbacks167 # == Canceling callbacks 168 168 # 169 169 # 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 170 170 # +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 79 79 end 80 80 end 81 81 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. 83 83 # Raise DangerousAttributeError if the method is defined by ActiveRecord though. 84 84 def instance_method_already_implemented?(method_name) 85 85 return true if method_name =~ /^id(=$|\?$|$)/ -
activerecord/lib/active_record/associations/has_many_through_association.rb
old new 120 120 def count(*args) 121 121 column_name, options = @reflection.klass.send(:construct_count_options_from_args, *args) 122 122 if @reflection.options[:uniq] 123 # This is needed beca se 'SELECT count(DISTINCT *)..' is not valid sql statement.123 # This is needed because 'SELECT count(DISTINCT *)..' is not valid sql statement. 124 124 column_name = "#{@reflection.klass.table_name}.#{@reflection.klass.primary_key}" if column_name == :all 125 125 options.merge!(:distinct => true) 126 126 end -
activerecord/lib/active_record/associations.rb
old new 266 266 # 267 267 # === Association callbacks 268 268 # 269 # Simil iar to the normal callbacks that hook into the lifecycle of an Active Record object, you can also define callbacks that get269 # Similar to the normal callbacks that hook into the lifecycle of an Active Record object, you can also define callbacks that get 270 270 # triggered when you add an object to or remove an object from an association collection. Example: 271 271 # 272 272 # class Project -
activerecord/lib/active_record/base.rb
old new 169 169 # anonymous = User.new(:name => "") 170 170 # anonymous.name? # => false 171 171 # 172 # == Accessing attributes before they have been typecast ed172 # == Accessing attributes before they have been typecast 173 173 # 174 174 # Sometimes you want to be able to read the raw attribute data without having the column-determined typecast run its course first. 175 175 # 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 123 123 # This defaults to +false+. 124 124 # 125 125 # 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 argu ement 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>. 127 127 # 128 128 # Option examples: 129 129 # composed_of :temperature, :mapping => %w(reading celsius) -
actionpack/test/controller/test_test.rb
old new 214 214 def test_assert_tag_descendant 215 215 process :test_html_output 216 216 217 # there is a tag with a de cendant 'li' tag217 # there is a tag with a descendant 'li' tag 218 218 assert_tag :descendant => { :tag => "li" } 219 219 # there is no tag with a descendant 'html' tag 220 220 assert_no_tag :descendant => { :tag => "html" } -
actionpack/test/controller/routing_test.rb
old new 882 882 end 883 883 884 884 def test_build_pattern_non_optional_with_no_captures 885 # Non optio anl885 # Non optional 886 886 a_segment = ROUTING::DynamicSegment.new 887 887 a_segment.regexp = /\d+/ #number_of_captures is 0 888 888 assert_equal "(\\d+)stuff", a_segment.build_pattern('stuff') 889 889 end 890 890 891 891 def test_build_pattern_non_optional_with_captures 892 # Non optio anl892 # Non optional 893 893 a_segment = ROUTING::DynamicSegment.new 894 894 a_segment.regexp = /(\d+)(.*?)/ #number_of_captures is 2 895 895 assert_equal "((\\d+)(.*?))stuff", a_segment.build_pattern('stuff') -
actionpack/test/controller/selector_test.rb
old new 85 85 assert_equal 2, @matches.size 86 86 assert_equal "2", @matches[0].attributes["id"] 87 87 assert_equal "3", @matches[1].attributes["id"] 88 # Match alement with attribute value.88 # Match element with attribute value. 89 89 select("*[title=foo]") 90 90 assert_equal 1, @matches.size 91 91 assert_equal "3", @matches[0].attributes["id"] 92 # Match alement with attribute and attribute value.92 # Match element with attribute and attribute value. 93 93 select("[bar=foo][title]") 94 94 assert_equal 1, @matches.size 95 95 assert_equal "2", @matches[0].attributes["id"] -
actionpack/lib/action_controller/routing_optimisation.rb
old new 8 8 # :requirements, we can just build up a string and return it. 9 9 # 10 10 # To support building optimisations for other common cases, the 11 # generation code is sep erated into several classes11 # generation code is separated into several classes 12 12 module Optimisation 13 13 def generate_optimisation_block(route, kind) 14 14 return "" unless route.optimise? -
actionpack/lib/action_controller/assertions.rb
old new 16 16 # assert flash.empty? # makes sure that there's nothing in the flash 17 17 # 18 18 # 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 devi ced 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. 20 20 # So assigns(:person) will work just like assigns["person"], but again, assigns[:person] will not work. 21 21 # 22 22 # 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 164 164 # For removing objects from the session, you can either assign a single key to nil, like <tt>session[:person] = nil</tt>, or you can 165 165 # remove the entire session with reset_session. 166 166 # 167 # Sessions are stored in a browser cookie that's cry tographically signed, but unencrypted, by default. This prevents167 # Sessions are stored in a browser cookie that's cryptographically signed, but unencrypted, by default. This prevents 168 168 # the user from tampering with the session but also allows him to see its contents. 169 169 # 170 170 # Do not put secret information in session! … … 293 293 # The param_parsers hash lets you register handlers which will process the http body and add parameters to the 294 294 # <tt>params</tt> hash. These handlers are invoked for post and put requests. 295 295 # 296 # By default application/xml is enabled. A XmlSimple class with the same param name as the root will be instan ciated296 # By default application/xml is enabled. A XmlSimple class with the same param name as the root will be instantiated 297 297 # in the <tt>params</tt>. This allows XML requests to mask themselves as regular form submissions, so you can have one 298 298 # action serve both regular forms and web service requests. 299 299 # … … 454 454 view_paths.push(*path) 455 455 end 456 456 457 # Replace sensitive param ater data from the request log.458 # Filters param aters 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. 459 459 # Looks in all subhashes of the param hash for keys to filter. 460 # If a block is given, each key and value of the param ater hash and all460 # If a block is given, each key and value of the parameter hash and all 461 461 # subhashes is passed to it, the value or key 462 462 # can be replaced using String#replace or similar method. 463 463 # … … 590 590 # However, you might ask why the action from the current request, 'contacts', isn't carried over into the new URL. The 591 591 # answer has to do with the order in which the parameters appear in the generated path. In a nutshell, since the 592 592 # 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. 594 594 # Â 595 595 # Although a convenience, defaults can occasionally get in your way. In some cases a default persists longer than desired. 596 596 # 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 70 70 # no layout explicitly assigned with the +layout+ method. Nested controllers use the same folder structure for automatic layout. 71 71 # assignment. So an Admin::WeblogController will look for a template named <tt>app/views/layouts/admin/weblog.erb</tt>. 72 72 # 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 assign ement if the child73 # Explicitly setting the layout in a parent class, though, will not override the child class's layout assignment if the child 74 74 # class has a layout with the same name. 75 75 # 76 76 # == Inheritance for layouts -
actionpack/lib/action_controller/rescue.rb
old new 227 227 # assume they should exist at this point. An early raised exception 228 228 # could trigger some other handler and the array could include 229 229 # precisely a string whose corresponding constant has not yet been 230 # seen. This is why we are tolerant to unk own constants.230 # seen. This is why we are tolerant to unknown constants. 231 231 # 232 232 # Note that this tolerance only matters if the exception was given as 233 233 # a string, otherwise a NameError will be raised by the interpreter -
actionpack/lib/action_view/helpers/number_helper.rb
old new 21 21 # number_to_phone(1235551234, :area_code => true, :extension => 555) # => (123) 555-1234 x 555 22 22 # number_to_phone(1235551234, :country_code => 1) # => +1-123-555-1234 23 23 # 24 # number_to_phone(1235551234, :country_code => 1, :extension => 1343, :delim eter => ".")24 # number_to_phone(1235551234, :country_code => 1, :extension => 1343, :delimiter => ".") 25 25 # => +1.123.555.1234 x 1343 26 26 def number_to_phone(number, options = {}) 27 27 number = number.to_s.strip unless number.nil? -
actionpack/lib/action_view/helpers/url_helper.rb
old new 331 331 # also used as the name of the link unless +name+ is specified. Additional 332 332 # HTML attributes for the link can be passed in +html_options+. 333 333 # 334 # mail_to has several methods for hindering email harvest ors and customizing334 # mail_to has several methods for hindering email harvesters and customizing 335 335 # the email itself by passing special keys to +html_options+. 336 336 # 337 337 # ==== Options -
actionpack/lib/action_view/helpers/asset_tag_helper.rb
old new 356 356 # 357 357 # ==== Options 358 358 # You can add HTML attributes using the +options+. The +options+ supports 359 # three additional keys for conv ienence and conformance:359 # three additional keys for convenience and conformance: 360 360 # 361 361 # * <tt>:alt</tt> - If no alt text is given, the file name part of the 362 362 # +source+ is used (capitalized and without the extension) -
actionpack/lib/action_view/helpers/date_helper.rb
old new 213 213 # Returns a set of html select-tags (one for year, month, day, hour, and minute) pre-selected with the +datetime+. 214 214 # It's also possible to explicitly set the order of the tags using the <tt>:order</tt> option with an array of 215 215 # 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 appen ed 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> 217 217 # keys to the +options+ to control visual display of the elements. 218 218 # 219 219 # ==== Examples … … 226 226 # select_datetime() 227 227 # 228 228 # # 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 th en month, day, year.229 # # with the fields ordered year, month, day rather than month, day, year. 230 230 # select_datetime(my_date_time, :order => [:year, :month, :day]) 231 231 # 232 232 # # Generates a datetime select that defaults to the datetime in my_date_time (four days after today) … … 249 249 # Returns a set of html select-tags (one for year, month, and day) pre-selected with the +date+. 250 250 # It's possible to explicitly set the order of the tags using the <tt>:order</tt> option with an array of 251 251 # 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 appen ed onto the <tt>:order</tt> passed in.252 # will be appended onto the <tt>:order</tt> passed in. 253 253 # 254 254 # ==== Examples 255 255 # my_date = Time.today + 6.days … … 261 261 # select_date() 262 262 # 263 263 # # 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 th en month, day, year.264 # # with the fields ordered year, month, day rather than month, day, year. 265 265 # select_date(my_date, :order => [:year, :month, :day]) 266 266 # 267 267 # # 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 1 1 module GeneratorTestHelper 2 # Insta tiates the Generator2 # Instantiates the Generator 3 3 def build_generator(name,params) 4 4 Rails::Generator::Base.instance(name,params) 5 5 end -
railties/lib/initializer.rb
old new 176 176 # 177 177 # In the default implementation, as each plugin discovered in <tt>plugin_paths</tt> is initialized: 178 178 # * its +lib+ directory, if present, is added to the load path (immediately after the applications lib directory) 179 # * <tt>init.rb</tt> is evalu tated, if present179 # * <tt>init.rb</tt> is evaluated, if present 180 180 # 181 181 # After all plugins are loaded, duplicates are removed from the load path. 182 182 # If an array of plugin names is specified in config.plugins, only those plugins will be loaded … … 217 217 end 218 218 end 219 219 220 # This initial zation sets $KCODE to 'u' to enable the multibyte safe operations.220 # This initialization sets $KCODE to 'u' to enable the multibyte safe operations. 221 221 # Plugin authors supporting other encodings should override this behaviour and 222 222 # set the relevant +default_charset+ on ActionController::Base 223 223 def initialize_encoding -
railties/lib/rails/plugin/loader.rb
old new 10 10 # all plugins, and adds all plugin load paths, when it is created. The plugins 11 11 # are then fully loaded (init.rb is evaluated) when load_plugins is called. 12 12 # 13 # It is the loader's responsibil ty to ensure that only the plugins specified13 # It is the loader's responsibility to ensure that only the plugins specified 14 14 # in the configuration are actually loaded, and that the order defined 15 15 # is respected. 16 16 def initialize(initializer)