diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2008-12-21 13:30:51 +1030 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2008-12-21 13:30:51 +1030 |
commit | 4fc9f69e54e649e2bc14a796ad7363426958a5ad (patch) | |
tree | f6bb401cb70e449fc79b1754fd46fa4fa71ad5da | |
parent | 199f4c54ea3139168a867b7f80ac789a3c29a48d (diff) | |
parent | 19939fd4c0d0e4eae4ec71df13228547dba03287 (diff) | |
download | rails-4fc9f69e54e649e2bc14a796ad7363426958a5ad.tar.gz rails-4fc9f69e54e649e2bc14a796ad7363426958a5ad.tar.bz2 rails-4fc9f69e54e649e2bc14a796ad7363426958a5ad.zip |
Merge branch 'master' of git@github.com:lifo/docrails
58 files changed, 1871 insertions, 1527 deletions
diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG index 5dc7a33f55..64124e06a8 100644 --- a/actionmailer/CHANGELOG +++ b/actionmailer/CHANGELOG @@ -12,7 +12,7 @@ *2.2.0 [RC1] (October 24th, 2008)* -* Add layout functionality to mailers [Pratik] +* Add layout functionality to mailers [Pratik Naik] Mailer layouts behaves just like controller layouts, except layout names need to have '_mailer' postfix for them to be automatically picked up. @@ -24,7 +24,7 @@ * Less verbose mail logging: just recipients for :info log level; the whole email for :debug only. #8000 [iaddict, Tarmo Tänav] -* Updated TMail to version 1.2.1 [raasdnil] +* Updated TMail to version 1.2.1 [Mikel Lindsaar] * Fixed that you don't have to call super in ActionMailer::TestCase#setup #10406 [jamesgolick] @@ -36,7 +36,7 @@ *2.0.1* (December 7th, 2007) -* Update ActionMailer so it treats ActionView the same way that ActionController does. Closes #10244 [rick] +* Update ActionMailer so it treats ActionView the same way that ActionController does. Closes #10244 [Rick Olson] * Pass the template_root as an array as ActionView's view_path * Request templates with the "#{mailer_name}/#{action}" as opposed to just "#{action}" @@ -45,11 +45,11 @@ * Update README to use new smtp settings configuration API. Closes #10060 [psq] -* Allow ActionMailer subclasses to individually set their delivery method (so two subclasses can have different delivery methods) #10033 [zdennis] +* Allow ActionMailer subclasses to individually set their delivery method (so two subclasses can have different delivery methods) #10033 [Zach Dennis] -* Update TMail to v1.1.0. Use an updated version of TMail if available. [mikel] +* Update TMail to v1.1.0. Use an updated version of TMail if available. [Mikel Lindsaar] -* Introduce a new base test class for testing Mailers. ActionMailer::TestCase [Koz] +* Introduce a new base test class for testing Mailers. ActionMailer::TestCase [Michael Koziarski] * Fix silent failure of rxml templates. #9879 [jstewart] @@ -84,7 +84,7 @@ *1.3.2* (February 5th, 2007) -* Deprecate server_settings renaming it to smtp_settings, add sendmail_settings to allow you to override the arguments to and location of the sendmail executable. [Koz] +* Deprecate server_settings renaming it to smtp_settings, add sendmail_settings to allow you to override the arguments to and location of the sendmail executable. [Michael Koziarski] *1.3.1* (January 16th, 2007) @@ -104,7 +104,7 @@ * Tighten rescue clauses. #5985 [james@grayproductions.net] -* Automatically included ActionController::UrlWriter, such that URL generation can happen within ActionMailer controllers. [DHH] +* Automatically included ActionController::UrlWriter, such that URL generation can happen within ActionMailer controllers. [David Heinemeier Hansson] * Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar] diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 1584ae5835..639cf14cd1 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -6,19 +6,19 @@ * Deprecated formatted_polymorphic_url. [Jeremy Kemper] -* Added the option to declare an asset_host as an object that responds to call (see http://github.com/dhh/asset-hosting-with-minimum-ssl for an example) [DHH] +* Added the option to declare an asset_host as an object that responds to call (see http://github.com/dhh/asset-hosting-with-minimum-ssl for an example) [David Heinemeier Hansson] -* Added support for multiple routes.rb files (useful for plugin engines). This also means that draw will no longer clear the route set, you have to do that by hand (shouldn't make a difference to you unless you're doing some funky stuff) [DHH] +* Added support for multiple routes.rb files (useful for plugin engines). This also means that draw will no longer clear the route set, you have to do that by hand (shouldn't make a difference to you unless you're doing some funky stuff) [David Heinemeier Hansson] * Dropped formatted_* routes in favor of just passing in :format as an option. This cuts resource routes generation in half #1359 [aaronbatalion] -* Remove support for old double-encoded cookies from the cookie store. These values haven't been generated since before 2.1.0, and any users who have visited the app in the intervening 6 months will have had their cookie upgraded. [Koz] +* Remove support for old double-encoded cookies from the cookie store. These values haven't been generated since before 2.1.0, and any users who have visited the app in the intervening 6 months will have had their cookie upgraded. [Michael Koziarski] * Allow helpers directory to be overridden via ActionController::Base.helpers_dir #1424 [Sam Pohlenz] * Remove deprecated ActionController::Base#assign_default_content_type_and_charset -* Changed the default of ActionView#render to assume partials instead of files when not given an options hash [DHH]. Examples: +* Changed the default of ActionView#render to assume partials instead of files when not given an options hash [David Heinemeier Hansson]. Examples: # Instead of <%= render :partial => "account" %> <%= render "account" %> @@ -34,9 +34,9 @@ # <%= render :partial => "posts/post", :collection => @posts %> <%= render(@posts) %> -* Remove deprecated render_component. Please use the plugin from http://github.com/rails/render_component/tree/master [Pratik] +* Remove deprecated render_component. Please use the plugin from http://github.com/rails/render_component/tree/master [Pratik Naik] -* Fixed RedCloth and BlueCloth shouldn't preload. Instead just assume that they're available if you want to use textilize and markdown and let autoload require them [DHH] +* Fixed RedCloth and BlueCloth shouldn't preload. Instead just assume that they're available if you want to use textilize and markdown and let autoload require them [David Heinemeier Hansson] *2.2.2 (November 21st, 2008)* @@ -53,7 +53,7 @@ product.resources :images, :except => :destroy end -* Added render :js for people who want to render inline JavaScript replies without using RJS [DHH] +* Added render :js for people who want to render inline JavaScript replies without using RJS [David Heinemeier Hansson] * Fixed that polymorphic_url should compact given array #1317 [hiroshi] @@ -63,9 +63,9 @@ * Fix regression bug that made date_select and datetime_select raise a Null Pointer Exception when a nil date/datetime was passed and only month and year were displayed #1289 [Bernardo Padua/Tor Erik] -* Simplified the logging format for parameters (don't include controller, action, and format as duplicates) [DHH] +* Simplified the logging format for parameters (don't include controller, action, and format as duplicates) [David Heinemeier Hansson] -* Remove the logging of the Session ID when the session store is CookieStore [DHH] +* Remove the logging of the Session ID when the session store is CookieStore [David Heinemeier Hansson] * Fixed regex in redirect_to to fully support URI schemes #1247 [Seth Fitzsimmons] @@ -76,7 +76,7 @@ * Fix incorrect closing CDATA delimiter and that HTML::Node.parse would blow up on unclosed CDATA sections [packagethief] -* Added stale? and fresh_when methods to provide a layer of abstraction above request.fresh? and friends [DHH]. Example: +* Added stale? and fresh_when methods to provide a layer of abstraction above request.fresh? and friends [David Heinemeier Hansson]. Example: class ArticlesController < ApplicationController def show_with_respond_to_block @@ -126,13 +126,13 @@ * Fixed FormTagHelper#submit_tag with :disable_with option wouldn't submit the button's value when was clicked #633 [Jose Fernandez] -* Stopped logging template compiles as it only clogs up the log [DHH] +* Stopped logging template compiles as it only clogs up the log [David Heinemeier Hansson] -* Changed the X-Runtime header to report in milliseconds [DHH] +* Changed the X-Runtime header to report in milliseconds [David Heinemeier Hansson] -* Changed BenchmarkHelper#benchmark to report in milliseconds [DHH] +* Changed BenchmarkHelper#benchmark to report in milliseconds [David Heinemeier Hansson] -* Changed logging format to be millisecond based and skip misleading stats [DHH]. Went from: +* Changed logging format to be millisecond based and skip misleading stats [David Heinemeier Hansson]. Went from: Completed in 0.10000 (4 reqs/sec) | Rendering: 0.04000 (40%) | DB: 0.00400 (4%) | 200 OK [http://example.com] @@ -156,7 +156,7 @@ * Added button_to_remote helper. #3641 [Donald Piret, Tarmo Tänav] -* Deprecate render_component. Please use render_component plugin from http://github.com/rails/render_component/tree/master [Pratik] +* Deprecate render_component. Please use render_component plugin from http://github.com/rails/render_component/tree/master [Pratik Naik] * Routes may be restricted to lists of HTTP methods instead of a single method or :any. #407 [Brennan Dunn, Gaius Centus Novus] map.resource :posts, :collection => { :search => [:get, :post] } @@ -190,7 +190,7 @@ * All 2xx requests are considered successful [Josh Peek] -* Fixed that AssetTagHelper#compute_public_path shouldn't cache the asset_host along with the source or per-request proc's won't run [DHH] +* Fixed that AssetTagHelper#compute_public_path shouldn't cache the asset_host along with the source or per-request proc's won't run [David Heinemeier Hansson] * Removed config.action_view.cache_template_loading, use config.cache_classes instead [Josh Peek] @@ -253,7 +253,7 @@ * Replaced TemplateFinder abstraction with ViewLoadPaths [Josh Peek] -* Added block-call style to link_to [Sam Stephenson/DHH]. Example: +* Added block-call style to link_to [Sam Stephenson/David Heinemeier Hansson]. Example: <% link_to(@profile) do %> <strong><%= @profile.name %></strong> -- <span>Check it out!!</span> @@ -284,30 +284,30 @@ * Added session(:on) to turn session management back on in a controller subclass if the superclass turned it off (Peter Jones) [#136] -* Change the request forgery protection to go by Content-Type instead of request.format so that you can't bypass it by POSTing to "#{request.uri}.xml" [rick] +* Change the request forgery protection to go by Content-Type instead of request.format so that you can't bypass it by POSTing to "#{request.uri}.xml" [Rick Olson] * InstanceTag#default_time_from_options with hash args uses Time.current as default; respects hash settings when time falls in system local spring DST gap [Geoff Buesing] * select_date defaults to Time.zone.today when config.time_zone is set [Geoff Buesing] * Fixed that TextHelper#text_field would corrypt when raw HTML was used as the value (mchenryc, Kevin Glowacz) [#80] -* Added ActionController::TestCase#rescue_action_in_public! to control whether the action under test should use the regular rescue_action path instead of simply raising the exception inline (great for error testing) [DHH] +* Added ActionController::TestCase#rescue_action_in_public! to control whether the action under test should use the regular rescue_action path instead of simply raising the exception inline (great for error testing) [David Heinemeier Hansson] -* Reduce number of instance variables being copied from controller to view. [Pratik] +* Reduce number of instance variables being copied from controller to view. [Pratik Naik] * select_datetime and select_time default to Time.zone.now when config.time_zone is set [Geoff Buesing] * datetime_select defaults to Time.zone.now when config.time_zone is set [Geoff Buesing] -* Remove ActionController::Base#view_controller_internals flag. [Pratik] +* Remove ActionController::Base#view_controller_internals flag. [Pratik Naik] * Add conditional options to caches_page method. [Paul Horsfall] -* Move missing template logic to ActionView. [Pratik] +* Move missing template logic to ActionView. [Pratik Naik] -* Introduce ActionView::InlineTemplate class. [Pratik] +* Introduce ActionView::InlineTemplate class. [Pratik Naik] -* Automatically parse posted JSON content for Mime::JSON requests. [rick] +* Automatically parse posted JSON content for Mime::JSON requests. [Rick Olson] POST /posts {"post": {"title": "Breaking News"}} @@ -317,14 +317,14 @@ # ... end -* add json_escape ERB util to escape html entities in json strings that are output in HTML pages. [rick] +* add json_escape ERB util to escape html entities in json strings that are output in HTML pages. [Rick Olson] * Provide a helper proxy to access helper methods from outside views. Closes #10839 [Josh Peek] e.g. ApplicationController.helpers.simple_format(text) * Improve documentation. [Xavier Noria, leethal, jerome] -* Ensure RJS redirect_to doesn't html-escapes string argument. Closes #8546 [josh, eventualbuddha, Pratik] +* Ensure RJS redirect_to doesn't html-escapes string argument. Closes #8546 [Josh Peek, eventualbuddha, Pratik Naik] * Support render :partial => collection of heterogeneous elements. #11491 [Zach Dennis] @@ -336,17 +336,17 @@ * Fixed HTML::Tokenizer (used in sanitize helper) didn't handle unclosed CDATA tags #10071 [esad, packagethief] -* Improve documentation. [Radar, Jan De Poorter, chuyeow, xaviershay, danger, miloops, Xavier Noria, Sunny Ripert] +* Improve documentation. [Ryan Bigg, Jan De Poorter, Cheah Chu Yeow, Xavier Shay, Jack Danger Canty, Emilio Tagua, Xavier Noria, Sunny Ripert] * Fixed that FormHelper#radio_button would produce invalid ids #11298 [harlancrystal] -* Added :confirm option to submit_tag #11415 [miloops] +* Added :confirm option to submit_tag #11415 [Emilio Tagua] * Fixed NumberHelper#number_with_precision to properly round in a way that works equally on Mac, Windows, Linux (closes #11409, #8275, #10090, #8027) [zhangyuanyi] -* Allow the #simple_format text_helper to take an html_options hash for each paragraph. #2448 [Francois Beausoleil, thechrisoshow] +* Allow the #simple_format text_helper to take an html_options hash for each paragraph. #2448 [François Beausoleil, Chris O'Sullivan] -* Fix regression from filter refactoring where re-adding a skipped filter resulted in it being called twice. [rick] +* Fix regression from filter refactoring where re-adding a skipped filter resulted in it being called twice. [Rick Olson] * Refactor filters to use Active Support callbacks. #11235 [Josh Peek] @@ -362,43 +362,43 @@ * Fix nested parameter hash parsing bug. #10797 [thomas.lee] -* Allow using named routes in ActionController::TestCase before any request has been made. Closes #11273 [alloy] +* Allow using named routes in ActionController::TestCase before any request has been made. Closes #11273 [Eloy Duran] -* Fixed that sweepers defined by cache_sweeper will be added regardless of the perform_caching setting. Instead, control whether the sweeper should be run with the perform_caching setting. This makes testing easier when you want to turn perform_caching on/off [DHH] +* Fixed that sweepers defined by cache_sweeper will be added regardless of the perform_caching setting. Instead, control whether the sweeper should be run with the perform_caching setting. This makes testing easier when you want to turn perform_caching on/off [David Heinemeier Hansson] * Make MimeResponds::Responder#any work without explicit types. Closes #11140 [jaw6] * Better error message for type conflicts when parsing params. Closes #7962 [spicycode, matt] -* Remove unused ActionController::Base.template_class. Closes #10787 [Pratik] +* Remove unused ActionController::Base.template_class. Closes #10787 [Pratik Naik] -* Moved template handlers related code from ActionView::Base to ActionView::Template. [Pratik] +* Moved template handlers related code from ActionView::Base to ActionView::Template. [Pratik Naik] -* Tests for div_for and content_tag_for helpers. Closes #11223 [thechrisoshow] +* Tests for div_for and content_tag_for helpers. Closes #11223 [Chris O'Sullivan] * Allow file uploads in Integration Tests. Closes #11091 [RubyRedRick] -* Refactor partial rendering into a PartialTemplate class. [Pratik] +* Refactor partial rendering into a PartialTemplate class. [Pratik Naik] -* Added that requests with JavaScript as the priority mime type in the accept header and no format extension in the parameters will be treated as though their format was :js when it comes to determining which template to render. This makes it possible for JS requests to automatically render action.js.rjs files without an explicit respond_to block [DHH] +* Added that requests with JavaScript as the priority mime type in the accept header and no format extension in the parameters will be treated as though their format was :js when it comes to determining which template to render. This makes it possible for JS requests to automatically render action.js.rjs files without an explicit respond_to block [David Heinemeier Hansson] -* Tests for distance_of_time_in_words with TimeWithZone instances. Closes #10914 [ernesto.jimenez] +* Tests for distance_of_time_in_words with TimeWithZone instances. Closes #10914 [Ernesto Jimenez] * Remove support for multivalued (e.g., '&'-delimited) cookies. [Jamis Buck] * Fix problem with render :partial collections, records, and locals. #11057 [lotswholetime] -* Added support for naming concrete classes in sweeper declarations [DHH] +* Added support for naming concrete classes in sweeper declarations [David Heinemeier Hansson] -* Remove ERB trim variables from trace template in case ActionView::Base.erb_trim_mode is changed in the application. #10098 [tpope, kampers] +* Remove ERB trim variables from trace template in case ActionView::Base.erb_trim_mode is changed in the application. #10098 [Tim Pope, Chris Kampmeier] -* Fix typo in form_helper documentation. #10650 [xaviershay, kampers] +* Fix typo in form_helper documentation. #10650 [Xavier Shay, Chris Kampmeier] * Fix bug with setting Request#format= after the getter has cached the value. #10889 [cch1] -* Correct inconsistencies in RequestForgeryProtection docs. #11032 [mislav] +* Correct inconsistencies in RequestForgeryProtection docs. #11032 [Mislav Marohnić] -* Introduce a Template class to ActionView. #11024 [lifofifo] +* Introduce a Template class to ActionView. #11024 [Pratik Naik] * Introduce the :index option for form_for and fields_for to simplify multi-model forms (see http://railscasts.com/episodes/75). #9883 [rmm5t] @@ -414,7 +414,7 @@ e.g. map.dashboard '/dashboard', :controller=>'dashboard' map.root :dashboard -* Handle corner case with image_tag when passed 'messed up' image names. #9018 [duncanbeevers, mpalmer] +* Handle corner case with image_tag when passed 'messed up' image names. #9018 [Duncan Beevers, mpalmer] * Add label_tag helper for generating elements. #10802 [DefV] @@ -422,15 +422,15 @@ * Performance: optimize route recognition. Large speedup for apps with many resource routes. #10835 [oleganza] -* Make render :partial recognise form builders and use the _form partial. #10814 [djanowski] +* Make render :partial recognise form builders and use the _form partial. #10814 [Damian Janowski] * Allow users to declare other namespaces when using the atom feed helpers. #10304 [david.calavera] * Introduce send_file :x_sendfile => true to send an X-Sendfile response header. [Jeremy Kemper] -* Fixed ActionView::Helpers::ActiveRecordHelper::form for when protect_from_forgery is used #10739 [jeremyevans] +* Fixed ActionView::Helpers::ActiveRecordHelper::form for when protect_from_forgery is used #10739 [Jeremy Evans] -* Provide nicer access to HTTP Headers. Instead of request.env["HTTP_REFERRER"] you can now use request.headers["Referrer"]. [Koz] +* Provide nicer access to HTTP Headers. Instead of request.env["HTTP_REFERRER"] you can now use request.headers["Referrer"]. [Michael Koziarski] * UrlWriter respects relative_url_root. #10748 [Cheah Chu Yeow] @@ -440,26 +440,26 @@ * assert_response failures include the exception message. #10688 [Seth Rasmussen] -* All fragment cache keys are now by default prefixed with the "views/" namespace [DHH] +* All fragment cache keys are now by default prefixed with the "views/" namespace [David Heinemeier Hansson] -* Moved the caching stores from ActionController::Caching::Fragments::* to ActiveSupport::Cache::*. If you're explicitly referring to a store, like ActionController::Caching::Fragments::MemoryStore, you need to update that reference with ActiveSupport::Cache::MemoryStore [DHH] +* Moved the caching stores from ActionController::Caching::Fragments::* to ActiveSupport::Cache::*. If you're explicitly referring to a store, like ActionController::Caching::Fragments::MemoryStore, you need to update that reference with ActiveSupport::Cache::MemoryStore [David Heinemeier Hansson] -* Deprecated ActionController::Base.fragment_cache_store for ActionController::Base.cache_store [DHH] +* Deprecated ActionController::Base.fragment_cache_store for ActionController::Base.cache_store [David Heinemeier Hansson] -* Made fragment caching in views work for rjs and builder as well #6642 [zsombor] +* Made fragment caching in views work for rjs and builder as well #6642 [Dee Zsombor] * Fixed rendering of partials with layout when done from site layout #9209 [antramm] -* Fix atom_feed_helper to comply with the atom spec. Closes #10672 [xaviershay] +* Fix atom_feed_helper to comply with the atom spec. Closes #10672 [Xavier Shay] * The tags created do not contain a date (http://feedvalidator.org/docs/error/InvalidTAG.html) * IDs are not guaranteed unique * A default self link was not provided, contrary to the documentation * NOTE: This changes tags for existing atom entries, but at least they validate now. -* Correct indentation in tests. Closes #10671 [l.guidi] +* Correct indentation in tests. Closes #10671 [Luca Guidi] -* Fix that auto_link looks for ='s in url paths (Amazon urls have them). Closes #10640 [bgreenlee] +* Fix that auto_link looks for ='s in url paths (Amazon urls have them). Closes #10640 [Brad Greenlee] * Ensure that test case setup is run even if overridden. #10382 [Josh Peek] @@ -476,7 +476,7 @@ * Added OPTIONS to list of default accepted HTTP methods #10449 [holoway] -* Added option to pass proc to ActionController::Base.asset_host for maximum configurability #10521 [chuyeow]. Example: +* Added option to pass proc to ActionController::Base.asset_host for maximum configurability #10521 [Cheah Chu Yeow]. Example: ActionController::Base.asset_host = Proc.new { |source| if source.starts_with?('/images') @@ -505,45 +505,45 @@ * Fixed send_file/binary_content for testing #8044 [tolsen] -* When a NonInferrableControllerError is raised, make the proposed fix clearer in the error message. Closes #10199 [danger] +* When a NonInferrableControllerError is raised, make the proposed fix clearer in the error message. Closes #10199 [Jack Danger Canty] * Update Prototype to 1.6.0.1. [sam] * Update script.aculo.us to 1.8.0.1. [madrobby] -* Add 'disabled' attribute to <OPTION> separators used in time zone and country selects. Closes #10354 [hasmanyjosh] +* Add 'disabled' attribute to <OPTION> separators used in time zone and country selects. Closes #10354 [Josh Susser] -* Added the same record identification guessing rules to fields_for as form_for has [DHH] +* Added the same record identification guessing rules to fields_for as form_for has [David Heinemeier Hansson] -* Fixed that verification violations with no specified action didn't halt the chain (now they do with a 400 Bad Request) [DHH] +* Fixed that verification violations with no specified action didn't halt the chain (now they do with a 400 Bad Request) [David Heinemeier Hansson] * Raise UnknownHttpMethod exception for unknown HTTP methods. Closes #10303 [Tarmo Tänav] * Update to Prototype -r8232. [sam] -* Make sure the optimisation code for routes doesn't get used if :host, :anchor or :port are provided in the hash arguments. [pager, Koz] #10292 +* Make sure the optimisation code for routes doesn't get used if :host, :anchor or :port are provided in the hash arguments. [pager, Michael Koziarski] #10292 * Added protection from trailing slashes on page caching #10229 [devrieda] -* Asset timestamps are appended, not prepended. Closes #10276 [mnaberez] +* Asset timestamps are appended, not prepended. Closes #10276 [Mike Naberezny] * Minor inconsistency in description of render example. Closes #10029 [ScottSchram] -* Add #prepend_view_path and #append_view_path instance methods on ActionController::Base for consistency with the class methods. [rick] +* Add #prepend_view_path and #append_view_path instance methods on ActionController::Base for consistency with the class methods. [Rick Olson] -* Refactor sanitizer helpers into HTML classes and make it easy to swap them out with custom implementations. Closes #10129. [rick] +* Refactor sanitizer helpers into HTML classes and make it easy to swap them out with custom implementations. Closes #10129. [Rick Olson] -* Add deprecation for old subtemplate syntax for ActionMailer templates, use render :partial [rick] +* Add deprecation for old subtemplate syntax for ActionMailer templates, use render :partial [Rick Olson] -* Fix TemplateError so it doesn't bomb on exceptions while running tests [rick] +* Fix TemplateError so it doesn't bomb on exceptions while running tests [Rick Olson] -* Fixed that named routes living under resources shouldn't have double slashes #10198 [isaacfeliu] +* Fixed that named routes living under resources shouldn't have double slashes #10198 [Isaac Feliu] -* Make sure that cookie sessions use a secret that is at least 30 chars in length. [Koz] +* Make sure that cookie sessions use a secret that is at least 30 chars in length. [Michael Koziarski] * Fixed that partial rendering should look at the type of the first render to determine its own type if no other clues are available (like when using text.plain.erb as the extension in AM) #10130 [java] -* Fixed that has_many :through associations should render as collections too #9051 [mathie/danger] +* Fixed that has_many :through associations should render as collections too #9051 [mathie/Jack Danger Canty] * Added :mouseover short-cut to AssetTagHelper#image_tag for doing easy image swaps #6893 [joost] @@ -551,7 +551,7 @@ * Fix syntax error in documentation example for cycle method. Closes #8735 [foca] -* Document :with option for link_to_remote. Closes #8765 [ryanb] +* Document :with option for link_to_remote. Closes #8765 [Ryan Bates] * Document :minute_step option for time_select. Closes #8814 [brupm] @@ -561,7 +561,7 @@ * Fix broken tag in assert_tag documentation. Closes #9037 [mfazekas] -* Add documentation for route conditions. Closes #9041 [innu, manfred] +* Add documentation for route conditions. Closes #9041 [innu, Manfred Stienstra] * Fix typo left over from previous typo fix in url helper. Closes #9414 [Henrik N] @@ -569,23 +569,23 @@ * Update Prototype to 1.6.0 and script.aculo.us to 1.8.0. [sam, madrobby] -* Expose the cookie jar as a helper method (before the view would just get the raw cookie hash) [DHH] +* Expose the cookie jar as a helper method (before the view would just get the raw cookie hash) [David Heinemeier Hansson] * Integration tests: get_ and post_via_redirect take a headers hash. #9130 [simonjefford] -* Simplfy #view_paths implementation. ActionView templates get the exact object, not a dup. [Rick] +* Simplfy #view_paths implementation. ActionView templates get the exact object, not a dup. [Rick Olson] -* Update tests for ActiveSupport's JSON escaping change. [rick] +* Update tests for ActiveSupport's JSON escaping change. [Rick Olson] * FormHelper's auto_index should use #to_param instead of #id_before_type_cast. Closes #9994 [mattly] * Doc typo fixes for ActiveRecordHelper. Closes #9973 [mikong] -* Make example parameters in restful routing docs idiomatic. Closes #9993 [danger] +* Make example parameters in restful routing docs idiomatic. Closes #9993 [Jack Danger Canty] * Make documentation comment for mime responders match documentation example. Closes #9357 [yon] -* Introduce a new test case class for functional tests. ActionController::TestCase. [Koz] +* Introduce a new test case class for functional tests. ActionController::TestCase. [Michael Koziarski] * Fix incorrect path in helper rdoc. Closes #9926 [viktor tron] @@ -601,13 +601,13 @@ * Disabled checkboxes don't submit a form value. #9301 [vladr, robinjfisher] -* Added tests for options to ActiveRecordHelper#form. Closes #7213 [richcollins, mikong, mislav] +* Added tests for options to ActiveRecordHelper#form. Closes #7213 [richcollins, mikong, Mislav Marohnić] -* Changed before_filter halting to happen automatically on render or redirect but no longer on simply returning false [DHH] +* Changed before_filter halting to happen automatically on render or redirect but no longer on simply returning false [David Heinemeier Hansson] * Ensure that cookies handle array values correctly. Closes #9937 [queso] -* Make sure resource routes don't clash with internal helpers like javascript_path, image_path etc. #9928 [gbuesing] +* Make sure resource routes don't clash with internal helpers like javascript_path, image_path etc. #9928 [Geoff Buesing] * caches_page uses a single after_filter instead of one per action. #9891 [Pratik Naik] @@ -619,15 +619,15 @@ * error_messages_for also takes :message and :header_message options which defaults to the old "There were problems with the following fields:" and "<count> errors prohibited this <object_name> from being saved". #8270 [rmm5t, zach-inglis-lt3] -* Make sure that custom inflections are picked up by map.resources. #9815 [mislav] +* Make sure that custom inflections are picked up by map.resources. #9815 [Mislav Marohnić] -* Changed SanitizeHelper#sanitize to only allow the custom attributes and tags when specified in the call [DHH] +* Changed SanitizeHelper#sanitize to only allow the custom attributes and tags when specified in the call [David Heinemeier Hansson] -* Extracted sanitization methods from TextHelper to SanitizeHelper [DHH] +* Extracted sanitization methods from TextHelper to SanitizeHelper [David Heinemeier Hansson] * rescue_from accepts :with => lambda { |exception| ... } or a normal block. #9827 [Pratik Naik] -* Add :status to redirect_to allowing users to choose their own response code without manually setting headers. #8297 [codahale, chasgrundy] +* Add :status to redirect_to allowing users to choose their own response code without manually setting headers. #8297 [Coda Hale, chasgrundy] * Add link_to :back which uses your referrer with a fallback to a javascript link. #7366 [eventualbuddha, Tarmo Tänav] @@ -635,13 +635,13 @@ * Fix url_for, redirect_to, etc. with :controller => :symbol instead of 'string'. #8562, #9525 [Justin Lynn, Tarmo Tänav, shoe] -* Use #require_library_or_gem to load the memcache library for the MemCache session and fragment cache stores. Closes #8662. [Rick] +* Use #require_library_or_gem to load the memcache library for the MemCache session and fragment cache stores. Closes #8662. [Rick Olson] -* Move ActionController::Routing.optimise_named_routes to ActionController::Base.optimise_named_routes. Now you can set it in the config. [Rick] +* Move ActionController::Routing.optimise_named_routes to ActionController::Base.optimise_named_routes. Now you can set it in the config. [Rick Olson] config.action_controller.optimise_named_routes = false -* ActionController::Routing::DynamicSegment#interpolation_chunk should call #to_s on all values before calling URI.escape. [Rick] +* ActionController::Routing::DynamicSegment#interpolation_chunk should call #to_s on all values before calling URI.escape. [Rick Olson] * Only accept session ids from cookies, prevents session fixation attacks. [bradediger] @@ -650,7 +650,7 @@ * Fixed that render template did not honor exempt_from_layout #9698 [pezra] -* Better error messages if you leave out the :secret option for request forgery protection. Closes #9670 [rick] +* Better error messages if you leave out the :secret option for request forgery protection. Closes #9670 [Rick Olson] * Allow ability to disable request forgery protection, disable it in test mode by default. Closes #9693 [Pratik Naik] @@ -662,40 +662,40 @@ * Cache asset ids. [Jeremy Kemper] -* Optimized named routes respect AbstractRequest.relative_url_root. #9612 [danielmorrison, Jeremy Kemper] +* Optimized named routes respect AbstractRequest.relative_url_root. #9612 [Daniel Morrison, Jeremy Kemper] * Introduce ActionController::Base.rescue_from to declare exception-handling methods. Cleaner style than the case-heavy rescue_action_in_public. #9449 [Norbert Crombach] -* Rename some RequestForgeryProtection methods. The class method is now #protect_from_forgery, and the default parameter is now 'authenticity_token'. [Rick] +* Rename some RequestForgeryProtection methods. The class method is now #protect_from_forgery, and the default parameter is now 'authenticity_token'. [Rick Olson] -* Merge csrf_killer plugin into rails. Adds RequestForgeryProtection model that verifies session-specific _tokens for non-GET requests. [Rick] +* Merge csrf_killer plugin into rails. Adds RequestForgeryProtection model that verifies session-specific _tokens for non-GET requests. [Rick Olson] -* Secure #sanitize, #strip_tags, and #strip_links helpers against xss attacks. Closes #8877. [Rick, Pratik Naik, Jacques Distler] +* Secure #sanitize, #strip_tags, and #strip_links helpers against xss attacks. Closes #8877. [Rick Olson, Pratik Naik, Jacques Distler] This merges and renames the popular white_list helper (along with some css sanitizing from Jacques Distler version of the same plugin). Also applied updated versions of #strip_tags and #strip_links from #8877. * Remove use of & logic operator. Closes #8114. [watson] -* Fixed JavaScriptHelper#escape_javascript to also escape closing tags #8023 [rubyruy] +* Fixed JavaScriptHelper#escape_javascript to also escape closing tags #8023 [Ruy Asan] * Fixed TextHelper#word_wrap for multiline strings with extra carrier returns #8663 [seth] * Fixed that setting the :host option in url_for would automatically turn off :only_path (since :host would otherwise not be shown) #9586 [Bounga] -* Added FormHelper#label. #8641, #9850 [jcoglan, jarkko] +* Added FormHelper#label. #8641, #9850 [jcoglan, Jarkko Laine] -* Added AtomFeedHelper (slightly improved from the atom_feed_helper plugin) [DHH] +* Added AtomFeedHelper (slightly improved from the atom_feed_helper plugin) [David Heinemeier Hansson] -* Prevent errors when generating routes for uncountable resources, (i.e. sheep where plural == singluar). map.resources :sheep now creates sheep_index_url for the collection and sheep_url for the specific item. [Koz] +* Prevent errors when generating routes for uncountable resources, (i.e. sheep where plural == singluar). map.resources :sheep now creates sheep_index_url for the collection and sheep_url for the specific item. [Michael Koziarski] -* Added support for HTTP Only cookies (works in IE6+ and FF 2.0.5+) as an improvement for XSS attacks #8895 [Pratik Naik, Spakman] +* Added support for HTTP Only cookies (works in IE6+ and FF 2.0.5+) as an improvement for XSS attacks #8895 [Pratik Naik, Mark Somerville] * Don't warn when a path segment precedes a required segment. Closes #9615. [Nicholas Seckar] * Fixed CaptureHelper#content_for to work with the optional content parameter instead of just the block #9434 [sandofsky/wildchild]. -* Added Mime::Type.register_alias for dealing with different formats using the same mime type [DHH]. Example: +* Added Mime::Type.register_alias for dealing with different formats using the same mime type [David Heinemeier Hansson]. Example: class PostsController < ApplicationController before_filter :adjust_format_for_iphone @@ -718,7 +718,7 @@ end end -* Added that render :json will automatically call .to_json unless it's being passed a string [DHH]. +* Added that render :json will automatically call .to_json unless it's being passed a string [David Heinemeier Hansson]. * Autolink behaves well with emails embedded in URLs. #7313 [Jeremy McAnally, Tarmo Tänav] @@ -730,7 +730,7 @@ * root_path returns '/' not ''. #9563 [Pratik Naik] -* Fixed that setting request.format should also affect respond_to blocks [DHH] +* Fixed that setting request.format should also affect respond_to blocks [David Heinemeier Hansson] * Add option to force binary mode on tempfile used for fixture_file_upload. #6380 [Jonathan Viney] @@ -740,20 +740,20 @@ * Moved ActionController::Macros::InPlaceEditing into the in_place_editor plugin on the official Rails svn. #9513 [Pratik Naik] -* Removed deprecated form of calling xml_http_request/xhr without the first argument being the http verb [DHH] +* Removed deprecated form of calling xml_http_request/xhr without the first argument being the http verb [David Heinemeier Hansson] -* Removed deprecated methods [DHH]: +* Removed deprecated methods [David Heinemeier Hansson]: - ActionController::Base#keep_flash (use flash.keep instead) - ActionController::Base#expire_matched_fragments (just call expire_fragment with a regular expression) - ActionController::Base.template_root/= methods (use ActionController#Base.view_paths/= instead) - ActionController::Base.cookie (use ActionController#Base.cookies[]= instead) -* Removed the deprecated behavior of appending ".png" to image_tag/image_path calls without an existing extension [DHH] +* Removed the deprecated behavior of appending ".png" to image_tag/image_path calls without an existing extension [David Heinemeier Hansson] -* Removed ActionController::Base.scaffold -- it went through the whole idea of scaffolding (card board walls you remove and tweak one by one). Use the scaffold generator instead (it does resources too now!) [DHH] +* Removed ActionController::Base.scaffold -- it went through the whole idea of scaffolding (card board walls you remove and tweak one by one). Use the scaffold generator instead (it does resources too now!) [David Heinemeier Hansson] -* Optimise named route generation when using positional arguments. [Koz] +* Optimise named route generation when using positional arguments. [Michael Koziarski] This change delivers significant performance benefits for the most common usage scenarios for modern rails applications by avoiding the @@ -764,9 +764,9 @@ * Fix layout overriding response status. #9476 [lotswholetime] -* Add field_set_tag for generating field_sets, closes #9477. [djanowski] +* Add field_set_tag for generating field_sets, closes #9477. [Damian Janowski] -* Allow additional parameters to be passed to named route helpers when using positional arguments. Closes #8930 [ian.w.white@gmail.com] +* Allow additional parameters to be passed to named route helpers when using positional arguments. Closes #8930 [Ian White] * Make render :partial work with a :collection of Hashes, previously this wasn't possible due to backwards compatibility restrictions. [Pratik Naik] @@ -776,15 +776,15 @@ * Find layouts even if they're not in the first view_paths directory. Closes #9258 [caio] -* Major improvement to the documentation for the options / select form helpers. Closes #9038 [kampers, jardeon, wesg] +* Major improvement to the documentation for the options / select form helpers. Closes #9038 [Chris Kampmeier, jardeon, wesg] * Fix number_to_human_size when using different precisions. Closes #7536. [RichardStrand, mpalmer] -* Added partial layouts (see example in action_view/lib/partials.rb) [DHH] +* Added partial layouts (see example in action_view/lib/partials.rb) [David Heinemeier Hansson] -* Allow you to set custom :conditions on resource routes. [Rick] +* Allow you to set custom :conditions on resource routes. [Rick Olson] -* Fixed that file.content_type for uploaded files would include a trailing \r #9053 [bgreenlee] +* Fixed that file.content_type for uploaded files would include a trailing \r #9053 [Brad Greenlee] * url_for now accepts a series of symbols representing the namespace of the record [Josh Knowles] @@ -792,7 +792,7 @@ * Make sure missing template exceptions actually say which template they were looking for. Closes #8683 [dasil003] -* Fix errors with around_filters which do not yield, restore 1.1 behaviour with after filters. Closes #8891 [skaes] +* Fix errors with around_filters which do not yield, restore 1.1 behaviour with after filters. Closes #8891 [Stefan Kaes] After filters will *no longer* be run if an around_filter fails to yield, users relying on this behaviour are advised to put the code in question after a yield statement in an around filter. @@ -804,13 +804,13 @@ render :partial => 'show.html.erb' -* Improve capture helper documentation. #8796 [kampers] +* Improve capture helper documentation. #8796 [Chris Kampmeier] * Prefix nested resource named routes with their action name, e.g. new_group_user_path(@group) instead of group_new_user_path(@group). The old nested action named route is deprecated in Rails 1.2.4. #8558 [David Chelimsky] -* Allow sweepers to be created solely for expiring after controller actions, not model changes [DHH] +* Allow sweepers to be created solely for expiring after controller actions, not model changes [David Heinemeier Hansson] -* Added assigns method to ActionController::Caching::Sweeper to easily access instance variables on the controller [DHH] +* Added assigns method to ActionController::Caching::Sweeper to easily access instance variables on the controller [David Heinemeier Hansson] * Give the legacy X-POST_DATA_FORMAT header greater precedence during params parsing for backward compatibility. [Jeremy Kemper] @@ -818,11 +818,11 @@ * Fixed that radio_button_tag should generate unique ids #3353 [Bob Silva, Rebecca, Josh Peek] -* Fixed that HTTP authentication should work if the header is called REDIRECT_X_HTTP_AUTHORIZATION as well #6754 [mislaw] +* Fixed that HTTP authentication should work if the header is called REDIRECT_X_HTTP_AUTHORIZATION as well #6754 [Mislav Marohnić] * Don't mistakenly interpret the request uri as the query string. #8731 [Pratik Naik, Jeremy Kemper] -* Make ActionView#view_paths an attr_accessor for real this time. Also, don't perform an unnecessary #compact on the @view_paths array in #initialize. Closes #8582 [dasil003, julik, rick] +* Make ActionView#view_paths an attr_accessor for real this time. Also, don't perform an unnecessary #compact on the @view_paths array in #initialize. Closes #8582 [dasil003, julik, Rick Olson] * Tolerate missing content type on multipart file uploads. Fix for Safari 3. [Jeremy Kemper] @@ -838,7 +838,7 @@ * Resources: url_for([parent, child]) generates /parents/1/children/2 for the nested resource. Likewise with the other simply helpful methods like form_for and link_to. #6432 [mhw, Jonathan Vaught, lotswholetime] -* Assume html format when rendering partials in RJS. #8076 [Rick] +* Assume html format when rendering partials in RJS. #8076 [Rick Olson] * Don't double-escape url_for in views. #8144 [Rich Collins, Josh Peek] @@ -858,13 +858,13 @@ * Reduce file stat calls when checking for template changes. #7736 [alex] -* Added custom path cache_page/expire_page parameters in addition to the options hashes [DHH]. Example: +* Added custom path cache_page/expire_page parameters in addition to the options hashes [David Heinemeier Hansson]. Example: def index caches_page(response.body, "/index.html") end -* Action Caching speedup. #8231 [skaes] +* Action Caching speedup. #8231 [Stefan Kaes] * Wordsmith resources documentation. #8484 [marclove] @@ -882,21 +882,21 @@ * Added option to suppress :size when using :maxlength for FormTagHelper#text_field #3112 [Tim Pope] -* catch possible WSOD when trying to render a missing partial. Closes #8454 [Catfish] +* catch possible WSOD when trying to render a missing partial. Closes #8454 [Jonathan del Strother] * Rewind request body after reading it, if possible. #8438 [s450r1] -* Resource namespaces are inherited by their has_many subresources. #8280 [marclove, ggarside] +* Resource namespaces are inherited by their has_many subresources. #8280 [marclove, Geoff Garside] * Fix filtered parameter logging with nil parameter values. #8422 [choonkeat] -* Integration tests: alias xhr to xml_http_request and add a request_method argument instead of always using POST. #7124 [Nik Wakelin, Francois Beausoleil, Wizard] +* Integration tests: alias xhr to xml_http_request and add a request_method argument instead of always using POST. #7124 [Nik Wakelin, François Beausoleil, Wizard] * Document caches_action. #5419 [Jarkko Laine] * Update to Prototype 1.5.1. [Sam Stephenson] -* Allow routes to be decalred under namespaces [Tobias Luetke]: +* Allow routes to be decalred under namespaces [Tobias Lütke]: map.namespace :admin do |admin| admin.root :controller => "products" @@ -905,13 +905,13 @@ * Update to script.aculo.us 1.7.1_beta3. [Thomas Fuchs] -* observe_form always sends the serialized form. #5271 [manfred, normelton@gmail.com] +* observe_form always sends the serialized form. #5271 [Manfred Stienstra, normelton@gmail.com] * Parse url-encoded and multipart requests ourselves instead of delegating to CGI. [Jeremy Kemper] * select :include_blank option can be set to a string instead of true, which just uses an empty string. #7664 [Wizard] -* Added url_for usage on render :location, which allows for record identification [DHH]. Example: +* Added url_for usage on render :location, which allows for record identification [David Heinemeier Hansson]. Example: render :xml => person, :status => :created, :location => person @@ -937,7 +937,7 @@ end end -* Added record identifications to FormHelper#form_for and PrototypeHelper#remote_form_for [DHH]. Examples: +* Added record identifications to FormHelper#form_for and PrototypeHelper#remote_form_for [David Heinemeier Hansson]. Examples: <% form_for(@post) do |f| %> ... @@ -961,28 +961,28 @@ ... <% end %> -* Rationalize route path escaping according to RFC 2396 section 3.3. #7544, #8307. [Jeremy Kemper, chrisroos, begemot, jugend] +* Rationalize route path escaping according to RFC 2396 section 3.3. #7544, #8307. [Jeremy Kemper, Chris Roos, begemot, jugend] -* Added record identification with polymorphic routes for ActionController::Base#url_for and ActionView::Base#url_for [DHH]. Examples: +* Added record identification with polymorphic routes for ActionController::Base#url_for and ActionView::Base#url_for [David Heinemeier Hansson]. Examples: redirect_to(post) # => redirect_to(posts_url(post)) => Location: http://example.com/posts/1 link_to(post.title, post) # => link_to(post.title, posts_url(post)) => <a href="/posts/1">Hello world</a> Any method that calls url_for on its parameters will automatically benefit from this. -* Removed deprecated parameters_for_method_reference concept (legacy from before named routes) [DHH] +* Removed deprecated parameters_for_method_reference concept (legacy from before named routes) [David Heinemeier Hansson] * Add ActionController::Routing::Helpers, a module to contain common URL helpers such as polymorphic_url. [Nicholas Seckar] -* Included the HttpAuthentication plugin as part of core (ActionController::HttpAuthentication::Basic) [DHH] +* Included the HttpAuthentication plugin as part of core (ActionController::HttpAuthentication::Basic) [David Heinemeier Hansson] -* Modernize documentation for form helpers. [jeremymcanally] +* Modernize documentation for form helpers. [Jeremy McAnally] * Add brief introduction to REST to the resources documentation. [fearoffish] * Fix various documentation typos throughout ActionPack. [Henrik N] -* Enhance documentation and add examples for url_for. [jeremymcanally] +* Enhance documentation and add examples for url_for. [Jeremy McAnally] * Fix documentation typo in routes. [Norbert Crombach, pam] @@ -992,24 +992,24 @@ * Replace the current block/continuation filter chain handling by an implementation based on a simple loop. #8226 [Stefan Kaes] -* Update UrlWriter to accept :anchor parameter. Closes #6771. [octopod] +* Update UrlWriter to accept :anchor parameter. Closes #6771. [Chris McGrath] -* Added RecordTagHelper for using RecordIdentifier conventions on divs and other container elements [DHH]. Example: +* Added RecordTagHelper for using RecordIdentifier conventions on divs and other container elements [David Heinemeier Hansson]. Example: <% div_for(post) do %> <div id="post_45" class="post"> <%= post.body %> What a wonderful world! <% end %> </div> -* Added page[record] accessor to JavaScriptGenerator that relies on RecordIdentifier to find the right dom id [DHH]. Example: +* Added page[record] accessor to JavaScriptGenerator that relies on RecordIdentifier to find the right dom id [David Heinemeier Hansson]. Example: format.js do # Calls: new Effect.fade('post_45'); render(:update) { |page| page[post].visual_effect(:fade) } end -* Added RecordIdentifier to enforce view conventions on records for dom ids, classes, and partial paths [DHH] +* Added RecordIdentifier to enforce view conventions on records for dom ids, classes, and partial paths [David Heinemeier Hansson] -* Added map.namespace to deal with the common situation of admin sections and the like [DHH] +* Added map.namespace to deal with the common situation of admin sections and the like [David Heinemeier Hansson] Before: @@ -1027,7 +1027,7 @@ :has_many => [ :tags, :images, :variants ] end -* Added :name_prefix as standard for nested resources [DHH]. WARNING: May be backwards incompatible with your app +* Added :name_prefix as standard for nested resources [David Heinemeier Hansson]. WARNING: May be backwards incompatible with your app Before: @@ -1045,7 +1045,7 @@ This does mean that if you intended to have comments_url go to /emails/5/comments, then you'll have to set :name_prefix to nil explicitly. -* Added :has_many and :has_one for declaring plural and singular resources beneath the current [DHH] +* Added :has_many and :has_one for declaring plural and singular resources beneath the current [David Heinemeier Hansson] Before: @@ -1059,28 +1059,28 @@ map.resources :notes, :has_many => [ :comments, :attachments ], :has_one => :author -* Added that render :xml will try to call to_xml if it can [DHH]. Makes these work: +* Added that render :xml will try to call to_xml if it can [David Heinemeier Hansson]. Makes these work: render :xml => post render :xml => comments -* Added :location option to render so that the common pattern of rendering a response after creating a new resource is now a 1-liner [DHH] +* Added :location option to render so that the common pattern of rendering a response after creating a new resource is now a 1-liner [David Heinemeier Hansson] render :xml => post.to_xml, :status => :created, :location => post_url(post) -* Ensure that render_text only adds string content to the body of the response [DHH] +* Ensure that render_text only adds string content to the body of the response [David Heinemeier Hansson] * Return the string representation from an Xml Builder when rendering a partial. Closes #5044 [Tim Pope] -* Fixed that parameters from XML should also be presented in a hash with indifferent access [DHH] +* Fixed that parameters from XML should also be presented in a hash with indifferent access [David Heinemeier Hansson] -* Tweak template format rules so that the ACCEPT header is only used if it's text/javascript. This is so ajax actions without a :format param get recognized as Mime::JS. [Rick] +* Tweak template format rules so that the ACCEPT header is only used if it's text/javascript. This is so ajax actions without a :format param get recognized as Mime::JS. [Rick Olson] -* The default respond_to blocks don't set a specific extension anymore, so that both 'show.rjs' and 'show.js.rjs' will work. [Rick] +* The default respond_to blocks don't set a specific extension anymore, so that both 'show.rjs' and 'show.js.rjs' will work. [Rick Olson] * Allow layouts with extension of .html.erb. Closes #8032 [Josh Knowles] -* Change default respond_to templates for xml and rjs formats. [Rick] +* Change default respond_to templates for xml and rjs formats. [Rick Olson] * Default xml template goes from #{action_name}.rxml => #{action_name}.xml.builder. * Default rjs template goes from #{action_name}.rjs => #{action_name}.js.rjs. @@ -1093,21 +1093,21 @@ end end -* Fix WSOD due to modification of a formatted template extension so that requests to templates like 'foo.html.erb' fail on the second hit. [Rick] +* Fix WSOD due to modification of a formatted template extension so that requests to templates like 'foo.html.erb' fail on the second hit. [Rick Olson] -* Fix WSOD when template compilation fails [Rick] +* Fix WSOD when template compilation fails [Rick Olson] -* Change ActionView template defaults. Look for templates using the request format first, such as "show.html.erb" or "show.xml.builder", before looking for the old defaults like "show.erb" or "show.builder" [Rick] +* Change ActionView template defaults. Look for templates using the request format first, such as "show.html.erb" or "show.xml.builder", before looking for the old defaults like "show.erb" or "show.builder" [Rick Olson] * Highlight helper highlights one or many terms in a single pass. [Jeremy Kemper] -* Dropped the use of ; as a separator of non-crud actions on resources and went back to the vanilla slash. It was a neat idea, but lots of the non-crud actions turned out not to be RPC (as the ; was primarily intended to discourage), but legitimate sub-resources, like /parties/recent, which didn't deserve the uglification of /parties;recent. Further more, the semicolon caused issues with caching and HTTP authentication in Safari. Just Not Worth It [DHH] +* Dropped the use of ; as a separator of non-crud actions on resources and went back to the vanilla slash. It was a neat idea, but lots of the non-crud actions turned out not to be RPC (as the ; was primarily intended to discourage), but legitimate sub-resources, like /parties/recent, which didn't deserve the uglification of /parties;recent. Further more, the semicolon caused issues with caching and HTTP authentication in Safari. Just Not Worth It [David Heinemeier Hansson] -* Added that FormTagHelper#submit_tag will return to its original state if the submit fails and you're using :disable_with [DHH] +* Added that FormTagHelper#submit_tag will return to its original state if the submit fails and you're using :disable_with [David Heinemeier Hansson] -* Cleaned up, corrected, and mildly expanded ActionPack documentation. Closes #7190 [jeremymcanally] +* Cleaned up, corrected, and mildly expanded ActionPack documentation. Closes #7190 [Jeremy McAnally] -* Small collection of ActionController documentation cleanups. Closes #7319 [jeremymcanally] +* Small collection of ActionController documentation cleanups. Closes #7319 [Jeremy McAnally] * Make sure the route expiry hash is constructed by comparing the to_param-ized values of each hash. [Jamis Buck] @@ -1137,19 +1137,19 @@ * Allow array and hash query parameters. Array route parameters are converted/to/a/path as before. #6765, #7047, #7462 [bgipsy, Jeremy McAnally, Dan Kubb, brendan] # Add a #dbman attr_reader for CGI::Session and make CGI::Session::CookieStore#generate_digest public so it's easy to generate digests -using the cookie store's secret. [Rick] +using the cookie store's secret. [Rick Olson] -* Added Request#url that returns the complete URL used for the request [DHH] +* Added Request#url that returns the complete URL used for the request [David Heinemeier Hansson] * Extract dynamic scaffolding into a plugin. #7700 [Josh Peek] -* Added user/password options for url_for to add http authentication in a URL [DHH] +* Added user/password options for url_for to add http authentication in a URL [David Heinemeier Hansson] * Fixed that FormTagHelper#text_area_tag should disregard :size option if it's not a string [Brendon Davidson] * Set the original button value in an attribute of the button when using the :disable_with key with submit_tag, so that the original can be restored later. [Jamis Buck] -* session_enabled? works with session :off. #6680 [Catfish] +* session_enabled? works with session :off. #6680 [Jonathan del Strother] * Added :port and :host handling to UrlRewriter (which unified url_for usage, regardless of whether it's called in view or controller) #7616 [alancfrancis] @@ -1161,7 +1161,7 @@ using the cookie store's secret. [Rick] * Cookie session store: empty and unchanged sessions don't write a cookie. [Jeremy Kemper] -* Added helper(:all) as a way to include all helpers from app/helpers/**/*.rb in ApplicationController [DHH] +* Added helper(:all) as a way to include all helpers from app/helpers/**/*.rb in ApplicationController [David Heinemeier Hansson] * Integration tests: introduce methods for other HTTP methods. #6353 [caboose] @@ -1182,7 +1182,7 @@ Roos] * Added .erb and .builder as preferred aliases to the now deprecated .rhtml and .rxml extensions [Chad Fowler]. This is done to separate the renderer from the mime type. .erb templates are often used to render emails, atom, csv, whatever. So labeling them .rhtml doesn't make too much sense. The same goes for .rxml, which can be used to build everything from HTML to Atom to whatever. .rhtml and .rxml will continue to work until Rails 3.0, though. So this is a slow phasing out. All generators and examples will start using the new aliases, though. -* Added caching option to AssetTagHelper#stylesheet_link_tag and AssetTagHelper#javascript_include_tag [DHH]. Examples: +* Added caching option to AssetTagHelper#stylesheet_link_tag and AssetTagHelper#javascript_include_tag [David Heinemeier Hansson]. Examples: stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is false => <link href="/stylesheets/style1.css" media="screen" rel="Stylesheet" type="text/css" /> @@ -1197,13 +1197,13 @@ Roos] * Work around the two connection per host browser limit: use asset%d.myapp.com to distribute asset requests among asset[0123].myapp.com. Use a DNS wildcard or CNAMEs to map these hosts to your asset server. See http://www.die.net/musings/page_load_time/ for background. [Jeremy Kemper] -* Added default mime type for CSS (Mime::CSS) [DHH] +* Added default mime type for CSS (Mime::CSS) [David Heinemeier Hansson] -* Added that rendering will automatically insert the etag header on 200 OK responses. The etag is calculated using MD5 of the response body. If a request comes in that has a matching etag, the response will be changed to a 304 Not Modified and the response body will be set to an empty string. [DHH] +* Added that rendering will automatically insert the etag header on 200 OK responses. The etag is calculated using MD5 of the response body. If a request comes in that has a matching etag, the response will be changed to a 304 Not Modified and the response body will be set to an empty string. [David Heinemeier Hansson] -* Added X-Runtime to all responses with the request run time [DHH] +* Added X-Runtime to all responses with the request run time [David Heinemeier Hansson] -* Add Mime::Type convenience methods to check the current mime type. [Rick] +* Add Mime::Type convenience methods to check the current mime type. [Rick Olson] request.format.html? # => true if Mime::HTML request.format.jpg? # => true if Mime::JPG @@ -1216,16 +1216,16 @@ Roos] * Add a :url_based_filename => true option to ActionController::Streaming::send_file, which allows URL-based filenames. [Thomas Fuchs] -* Fix that FormTagHelper#submit_tag using :disable_with should trigger the onsubmit handler of its form if available [DHH] +* Fix that FormTagHelper#submit_tag using :disable_with should trigger the onsubmit handler of its form if available [David Heinemeier Hansson] -* Fix #render_file so that TemplateError is called with the correct params and you don't get the WSOD. [Rick] +* Fix #render_file so that TemplateError is called with the correct params and you don't get the WSOD. [Rick Olson] * Fix issue with deprecation messing up #template_root= usage. Add #prepend_view_path and #append_view_path to allow modification of a copy of the -superclass' view_paths. [Rick] +superclass' view_paths. [Rick Olson] * Allow Controllers to have multiple view_paths instead of a single template_root. Closes #2754 [John Long] -* Add much-needed html-scanner tests. Fixed CDATA parsing bug. [Rick] +* Add much-needed html-scanner tests. Fixed CDATA parsing bug. [Rick Olson] * improve error message for Routing for named routes. Closes #7346 [Rob Sanheim] @@ -1233,15 +1233,15 @@ superclass' view_paths. [Rick] * fix form_for example in ActionController::Resources documentation. Closes #7362 [gnarg] -* Make sure that the string returned by TextHelper#truncate is actually a string, not a char proxy -- that should only be used internally while working on a multibyte-safe way of truncating [DHH] +* Make sure that the string returned by TextHelper#truncate is actually a string, not a char proxy -- that should only be used internally while working on a multibyte-safe way of truncating [David Heinemeier Hansson] -* Added FormBuilder#submit as a delegate for FormTagHelper#submit_tag [DHH] +* Added FormBuilder#submit as a delegate for FormTagHelper#submit_tag [David Heinemeier Hansson] * Allow Routes to generate all urls for a set of options by specifying :generate_all => true. Allows caching to properly set or expire all paths for a resource. References #1739. [Nicholas Seckar] * Change the query parser to map empty GET params to "" rather than nil. Closes #5694. [Nicholas Seckar] -* date_select and datetime_select take a :default option. #7052 [nik.wakelin] +* date_select and datetime_select take a :default option. #7052 [Nik Wakelin] date_select "post", "written_on", :default => 3.days.from_now date_select "credit_card", "bill_due", :default => { :day => 20 } @@ -1257,7 +1257,7 @@ superclass' view_paths. [Rick] * Change session restoration to allow namespaced models to be autoloaded. Closes #6348. [Nicholas Seckar] -* Fix doubly appearing parameters due to string and symbol mixups. Closes #2551. [aeden] +* Fix doubly appearing parameters due to string and symbol mixups. Closes #2551. [Anthony Eden] * Fix overly greedy rescues when loading helpers. Fixes #6268. [Nicholas Seckar] @@ -1277,7 +1277,7 @@ superclass' view_paths. [Rick] * Fix #distance_of_time_in_words to report accurately against the Duration class. #7114 [eventualbuddha] -* Refactor #form_tag to allow easy extending. [Rick] +* Refactor #form_tag to allow easy extending. [Rick Olson] * Update to Prototype 1.5.0. [Sam Stephenson] @@ -1289,11 +1289,11 @@ superclass' view_paths. [Rick] * Allow exempt_from_layout :rhtml. #6742, #7026 [Dan Manges, Squeegy] -* Recognize the .txt extension as Mime::TEXT [Rick] +* Recognize the .txt extension as Mime::TEXT [Rick Olson] * Fix parsing of array[] CGI parameters so extra empty values aren't included. #6252 [Nicholas Seckar, aiwilliams, brentrowland] -* link_to_unless_current works with full URLs as well as paths. #6891 [Jarkko Laine, manfred, idrifter] +* link_to_unless_current works with full URLs as well as paths. #6891 [Jarkko Laine, Manfred Stienstra, idrifter] * Lookup the mime type for #auto_discovery_link_tag in the Mime::Type class. Closes #6941 [Josh Peek] @@ -1339,7 +1339,7 @@ superclass' view_paths. [Rick] * Unrescued ActiveRecord::RecordNotFound responds with 404 instead of 500. [Jeremy Kemper] -* Improved auto_link to match more valid urls correctly [Tobias Luetke] +* Improved auto_link to match more valid urls correctly [Tobias Lütke] * Add singleton resources. [Rick Olson] @@ -1362,7 +1362,7 @@ superclass' view_paths. [Rick] * Add :index and @auto_index capability to model driven date/time selects. #847, #2655 [moriq, Doug Fales, Bob Silva] -* Add :order to datetime_select, select_datetime, and select_date. #1427 [Timothee Peignier, patrick@lenz.sh, Bob Silva] +* Add :order to datetime_select, select_datetime, and select_date. #1427 [Timothee Peignier, Patrick Lenz, Bob Silva] * Added time_select to work with time values in models. Update scaffolding. #2489, #2833 [Justin Palmer, Andre Caum, Bob Silva] @@ -1372,15 +1372,15 @@ superclass' view_paths. [Rick] * Adds :time_separator to select_time and :date_separator to select_datetime. Preserves BC. #3811 [Bob Silva] -* Added map.root as an alias for map.connect '' [DHH] +* Added map.root as an alias for map.connect '' [David Heinemeier Hansson] -* Added Request#format to return the format used for the request as a mime type. If no format is specified, the first Request#accepts type is used. This means you can stop using respond_to for anything else than responses [DHH]. Examples: +* Added Request#format to return the format used for the request as a mime type. If no format is specified, the first Request#accepts type is used. This means you can stop using respond_to for anything else than responses [David Heinemeier Hansson]. Examples: GET /posts/5.xml | request.format => Mime::XML GET /posts/5.xhtml | request.format => Mime::HTML GET /posts/5 | request.format => request.accepts.first (usually Mime::HTML for browsers) -* Added the option for extension aliases to mime type registration [DHH]. Example (already in the default routes): +* Added the option for extension aliases to mime type registration [David Heinemeier Hansson]. Example (already in the default routes): Mime::Type.register "text/html", :html, %w( application/xhtml+xml ), %w( xhtml ) @@ -1390,9 +1390,9 @@ superclass' view_paths. [Rick] * Added CSV to Mime::SET so that respond_to csv will work [Cody Fauser] -* Fixed that HEAD should return the proper Content-Length header (that is, actually use @body.size, not just 0) [DHH] +* Fixed that HEAD should return the proper Content-Length header (that is, actually use @body.size, not just 0) [David Heinemeier Hansson] -* Added GET-masquarading for HEAD, so request.method will return :get even for HEADs. This will help anyone relying on case request.method to automatically work with HEAD and map.resources will also allow HEADs to all GET actions. Rails automatically throws away the response content in a reply to HEAD, so you don't even need to worry about that. If you, for whatever reason, still need to distinguish between GET and HEAD in some edge case, you can use Request#head? and even Request.headers["REQUEST_METHOD"] for get the "real" answer. Closes #6694 [DHH] +* Added GET-masquarading for HEAD, so request.method will return :get even for HEADs. This will help anyone relying on case request.method to automatically work with HEAD and map.resources will also allow HEADs to all GET actions. Rails automatically throws away the response content in a reply to HEAD, so you don't even need to worry about that. If you, for whatever reason, still need to distinguish between GET and HEAD in some edge case, you can use Request#head? and even Request.headers["REQUEST_METHOD"] for get the "real" answer. Closes #6694 [David Heinemeier Hansson] * Update Routing to complain when :controller is not specified by a route. Closes #6669. [Nicholas Seckar] @@ -1441,13 +1441,13 @@ superclass' view_paths. [Rick] * Update to latest Prototype, which doesn't serialize disabled form elements, adds clone() to arrays, empty/non-string Element.update() and adds a fixes excessive error reporting in WebKit beta versions [Thomas Fuchs] -* Deprecate start_form_tag and end_form_tag. Use form_tag / '</form>' from now on. [Rick] +* Deprecate start_form_tag and end_form_tag. Use form_tag / '</form>' from now on. [Rick Olson] -* Added block-usage to PrototypeHelper#form_remote_tag, document block-usage of FormTagHelper#form_tag [Rick] +* Added block-usage to PrototypeHelper#form_remote_tag, document block-usage of FormTagHelper#form_tag [Rick Olson] -* Add a 0 margin/padding div around the hidden _method input tag that form_tag outputs. [Rick] +* Add a 0 margin/padding div around the hidden _method input tag that form_tag outputs. [Rick Olson] -* Added block-usage to TagHelper#content_tag [DHH]. Example: +* Added block-usage to TagHelper#content_tag [David Heinemeier Hansson]. Example: <% content_tag :div, :class => "strong" %> Hello world! @@ -1456,13 +1456,13 @@ superclass' view_paths. [Rick] Will output: <div class="strong">Hello world!</div> -* Deprecated UrlHelper#link_to_image and UrlHelper#link_to :post => true #6409 [BobSilva] +* Deprecated UrlHelper#link_to_image and UrlHelper#link_to :post => true #6409 [Bob Silva] -* Upgraded NumberHelper with number_to_phone support international formats to comply with ITU E.123 by supporting area codes with less than 3 digits, added precision argument to number_to_human_size (defaults to 1) #6421 [BobSilva] +* Upgraded NumberHelper with number_to_phone support international formats to comply with ITU E.123 by supporting area codes with less than 3 digits, added precision argument to number_to_human_size (defaults to 1) #6421 [Bob Silva] -* Fixed that setting RAILS_ASSET_ID to "" should not add a trailing slash after assets #6454 [BobSilva/chrismear] +* Fixed that setting RAILS_ASSET_ID to "" should not add a trailing slash after assets #6454 [Bob Silva/chrismear] -* Force *_url named routes to show the host in ActionView [Rick] +* Force *_url named routes to show the host in ActionView [Rick Olson] <%= url_for ... %> # no host <%= foo_path %> # no host @@ -1472,9 +1472,9 @@ superclass' view_paths. [Rick] * Add JavaScriptGenerator#literal for wrapping a string in an object whose #to_json is the string itself. [Sam Stephenson] -* Add <%= escape_once html %> to escape html while leaving any currently escaped entities alone. Fix button_to double-escaping issue. [Rick] +* Add <%= escape_once html %> to escape html while leaving any currently escaped entities alone. Fix button_to double-escaping issue. [Rick Olson] -* Fix double-escaped entities, such as &amp;, &#123;, etc. [Rick] +* Fix double-escaped entities, such as &amp;, &#123;, etc. [Rick Olson] * Fix deprecation warnings when rendering the template error template. [Nicholas Seckar] @@ -1500,7 +1500,7 @@ superclass' view_paths. [Rick] * Rename test assertion to prevent shadowing. Closes #6306. [psross] -* Fixed that NumberHelper#number_to_delimiter should respect precision of higher than two digits #6231 [phallstrom] +* Fixed that NumberHelper#number_to_delimiter should respect precision of higher than two digits #6231 [Philip Hallstrom] * Fixed that FormHelper#radio_button didn't respect an :id being passed in #6266 [evansj] @@ -1514,7 +1514,7 @@ superclass' view_paths. [Rick] Which is needed for dealing with the IE6 DOM when it's not yet fully loaded. -* Fixed that rescue template path shouldn't be hardcoded, then it's easier to hook in your own #6295 [mnaberez] +* Fixed that rescue template path shouldn't be hardcoded, then it's easier to hook in your own #6295 [Mike Naberezny] * Fixed escaping of backslashes in JavaScriptHelper#escape_javascript #6302 [sven@c3d2.de] @@ -1555,7 +1555,7 @@ superclass' view_paths. [Rick] * Rescue Errno::ECONNRESET to handle an unexpectedly closed socket connection. Improves SCGI reliability. #3368, #6226 [sdsykes, fhanshaw@vesaria.com] -* Added that respond_to blocks will automatically set the content type to be the same as is requested [DHH]. Examples: +* Added that respond_to blocks will automatically set the content type to be the same as is requested [David Heinemeier Hansson]. Examples: respond_to do |format| format.html { render :text => "I'm being sent as text/html" } @@ -1563,9 +1563,9 @@ superclass' view_paths. [Rick] format.atom { render :text => "I'm being sent as application/xml", :content_type => Mime::XML } end -* Added utf-8 as the default charset for all renders. You can change this default using ActionController::Base.default_charset=(encoding) [DHH] +* Added utf-8 as the default charset for all renders. You can change this default using ActionController::Base.default_charset=(encoding) [David Heinemeier Hansson] -* Added proper getters and setters for content type and charset [DHH]. Example of what we used to do: +* Added proper getters and setters for content type and charset [David Heinemeier Hansson]. Example of what we used to do: response.headers["Content-Type"] = "application/atom+xml; charset=utf-8" @@ -1600,7 +1600,7 @@ superclass' view_paths. [Rick] * Load helpers in alphabetical order for consistency. Resolve cyclic javascript_helper dependency. #6132, #6178 [choonkeat@gmail.com] -* Skip params with empty names, such as the &=Save query string from <input type="submit"/>. #2569 [manfred, raphinou@yahoo.com] +* Skip params with empty names, such as the &=Save query string from <input type="submit"/>. #2569 [Manfred Stienstra, raphinou@yahoo.com] * Fix assert_tag so that :content => "foo" does not match substrings, but only exact strings. Use :content => /foo/ to match substrings. #2799 [Eric Hodel] @@ -1610,7 +1610,7 @@ superclass' view_paths. [Rick] * Update UrlWriter to support :only_path. [Nicholas Seckar, Dave Thomas] -* Fixed JavaScriptHelper#link_to_function and JavaScriptHelper#button_to_function to have the script argument be optional [DHH]. So what used to require a nil, like this: +* Fixed JavaScriptHelper#link_to_function and JavaScriptHelper#button_to_function to have the script argument be optional [David Heinemeier Hansson]. So what used to require a nil, like this: link_to("Hider", nil, :class => "hider_link") { |p| p[:something].hide } @@ -1631,7 +1631,7 @@ superclass' view_paths. [Rick] * Fixed that AssetTagHelper#image_tag and others using compute_public_path should not modify the incoming source argument (closes #5102) [eule@space.ch] -* Deprecated the auto-appending of .png to AssetTagHelper#image_tag calls that doesn't have an extension [DHH] +* Deprecated the auto-appending of .png to AssetTagHelper#image_tag calls that doesn't have an extension [David Heinemeier Hansson] * Fixed FormOptionsHelper#select to respect :selected value #5813 @@ -1641,16 +1641,16 @@ superclass' view_paths. [Rick] * Improved resolution of DateHelper#distance_of_time_in_words for better precision #5994 [Bob Silva] -* Changed that uncaught exceptions raised any where in the application will cause RAILS_ROOT/public/500.html to be read and shown instead of just the static "Application error (Rails)" [DHH] +* Changed that uncaught exceptions raised any where in the application will cause RAILS_ROOT/public/500.html to be read and shown instead of just the static "Application error (Rails)" [David Heinemeier Hansson] * Integration tests: thoroughly test ActionController::Integration::Session. #6022 [Kevin Clark] (tests skipped unless you `gem install mocha`) -* Added deprecation language for pagination which will become a plugin by Rails 2.0 [DHH] +* Added deprecation language for pagination which will become a plugin by Rails 2.0 [David Heinemeier Hansson] -* Added deprecation language for in_place_editor and auto_complete_field that both pieces will become plugins by Rails 2.0 [DHH] +* Added deprecation language for in_place_editor and auto_complete_field that both pieces will become plugins by Rails 2.0 [David Heinemeier Hansson] -* Deprecated all of ActionController::Dependencies. All dependency loading is now handled from Active Support [DHH] +* Deprecated all of ActionController::Dependencies. All dependency loading is now handled from Active Support [David Heinemeier Hansson] * Added assert_select* for CSS selector-based testing (deprecates assert_tag) #5936 [assaf.arkin@gmail.com] @@ -1668,7 +1668,7 @@ superclass' view_paths. [Rick] * Add routing tests to assert that RoutingError is raised when conditions aren't met. Closes #6016 [Nathan Witmer] -* Deprecation: update docs. #5998 [jakob@mentalized.net, Kevin Clark] +* Deprecation: update docs. #5998 [Jakob Skjerning, Kevin Clark] * Make auto_link parse a greater subset of valid url formats. [Jamis Buck] @@ -1678,15 +1678,15 @@ superclass' view_paths. [Rick] * Fix send_data documentation typo. #5982 [brad@madriska.com] -* Switch to using FormEncodedPairParser for parsing request parameters. [Nicholas Seckar, DHH] +* Switch to using FormEncodedPairParser for parsing request parameters. [Nicholas Seckar, David Heinemeier Hansson] -* respond_to .html now always renders #{action_name}.rhtml so that registered custom template handlers do not override it in priority. Custom mime types require a block and throw proper error now. [Tobias Luetke] +* respond_to .html now always renders #{action_name}.rhtml so that registered custom template handlers do not override it in priority. Custom mime types require a block and throw proper error now. [Tobias Lütke] * Deprecation: test deprecated instance vars in partials. [Jeremy Kemper] * Add UrlWriter to allow writing urls from Mailers and scripts. [Nicholas Seckar] -* Clean up and run the Active Record integration tests by default. #5854 [kevin.clark@gmail.com, Jeremy Kemper] +* Clean up and run the Active Record integration tests by default. #5854 [Kevin Clark, Jeremy Kemper] * Correct example in cookies docs. #5832 [jessemerriman@warpmail.net] @@ -1714,7 +1714,7 @@ superclass' view_paths. [Rick] * Deprecation! @params, @session, @flash will be removed after 1.2. Use the corresponding instance methods instead. You'll get printed warnings during tests and logged warnings in dev mode when you access either instance variable directly. [Jeremy Kemper] -* Make Routing noisy when an anchor regexp is assigned to a segment. #5674 [francois.beausoleil@gmail.com] +* Make Routing noisy when an anchor regexp is assigned to a segment. #5674 [François Beausoleil] * Added months and years to the resolution of DateHelper#distance_of_time_in_words, such that "60 days ago" becomes "2 months ago" #5611 [pjhyett@gmail.com] @@ -1734,7 +1734,7 @@ superclass' view_paths. [Rick] * Fixed the new_#{resource}_url route and added named route tests for Simply Restful. [Rick Olson] -* Added map.resources from the Simply Restful plugin [DHH]. Examples (the API has changed to use plurals!): +* Added map.resources from the Simply Restful plugin [David Heinemeier Hansson]. Examples (the API has changed to use plurals!): map.resources :messages map.resources :messages, :comments @@ -1742,13 +1742,13 @@ superclass' view_paths. [Rick] * Fixed that integration simulation of XHRs should set Accept header as well [Edward Frederick] -* TestRequest#reset_session should restore a TestSession, not a hash [Koz] +* TestRequest#reset_session should restore a TestSession, not a hash [Michael Koziarski] * Don't search a load-path of '.' for controller files [Jamis Buck] * Update integration.rb to require test_process explicitly instead of via Dependencies. [Nicholas Seckar] -* Fixed that you can still access the flash after the flash has been reset in reset_session. Closes #5584 [lmarlow@yahoo.com] +* Fixed that you can still access the flash after the flash has been reset in reset_session. Closes #5584 [lmarlow] * Allow form_for and fields_for to work with indexed form inputs. [Jeremy Kemper, Matt Lyon] @@ -1757,13 +1757,13 @@ superclass' view_paths. [Rick] * Remove leak in development mode by replacing define_method with module_eval. [Nicholas Seckar] -* Provide support for decimal columns to form helpers. Closes #5672. [dave@pragprog.com] +* Provide support for decimal columns to form helpers. Closes #5672. [Dave Thomas] * Update documentation for erb trim syntax. #5651 [matt@mattmargolis.net] * Pass :id => nil or :class => nil to error_messages_for to supress that html attribute. #3586 [olivier_ansaldi@yahoo.com, sebastien@goetzilla.info] -* Reset @html_document between requests so assert_tag works. #4810 [jarkko@jlaine.net, easleydp@gmail.com] +* Reset @html_document between requests so assert_tag works. #4810 [Jarkko Laine, easleydp@gmail.com] * Update render :partial documentation. #5646 [matt@mattmargolis.net] @@ -1773,21 +1773,21 @@ superclass' view_paths. [Rick] * Fixed that real files and symlinks should be treated the same when compiling templates #5438 [zachary@panandscan.com] -* Fixed that the flash should be reset when reset_session is called #5584 [shugo@ruby-lang.org] +* Fixed that the flash should be reset when reset_session is called #5584 [Shugo Maeda] * Added special case for "1 Byte" in NumberHelper#number_to_human_size #5593 [murpyh@rubychan.de] -* Fixed proper form-encoded parameter parsing for requests with "Content-Type: application/x-www-form-urlencoded; charset=utf-8" (note the presence of a charset directive) [DHH] +* Fixed proper form-encoded parameter parsing for requests with "Content-Type: application/x-www-form-urlencoded; charset=utf-8" (note the presence of a charset directive) [David Heinemeier Hansson] * Add route_name_path method to generate only the path for a named routes. For example, map.person will add person_path. [Nicholas Seckar] * Avoid naming collision among compiled view methods. [Jeremy Kemper] -* Fix CGI extensions when they expect string but get nil in Windows. Closes #5276 [mislav@nippur.irb.hr] +* Fix CGI extensions when they expect string but get nil in Windows. Closes #5276 [Mislav Marohnić] * Determine the correct template_root for deeply nested components. #2841 [s.brink@web.de] -* Fix that routes with *path segments in the recall can generate URLs. [Rick] +* Fix that routes with *path segments in the recall can generate URLs. [Rick Olson] * Fix strip_links so that it doesn't hang on multiline <acronym> tags [Jamis Buck] @@ -1805,11 +1805,11 @@ superclass' view_paths. [Rick] * Rewind readable CGI params so others may reread them (such as CGI::Session when passing the session id in a multipart form). #210 [mklame@atxeu.com, matthew@walker.wattle.id.au] -* Added Mime::TEXT (text/plain) and Mime::ICS (text/calendar) as new default types [DHH] +* Added Mime::TEXT (text/plain) and Mime::ICS (text/calendar) as new default types [David Heinemeier Hansson] -* Added Mime::Type.register(string, symbol, synonyms = []) for adding new custom mime types [DHH]. Example: Mime::Type.register("image/gif", :gif) +* Added Mime::Type.register(string, symbol, synonyms = []) for adding new custom mime types [David Heinemeier Hansson]. Example: Mime::Type.register("image/gif", :gif) -* Added support for Mime objects in render :content_type option [DHH]. Example: render :text => some_atom, :content_type => Mime::ATOM +* Added support for Mime objects in render :content_type option [David Heinemeier Hansson]. Example: render :text => some_atom, :content_type => Mime::ATOM * Add :status option to send_data and send_file. Defaults to '200 OK'. #5243 [Manfred Stienstra <m.stienstra@fngtps.com>] @@ -1823,7 +1823,7 @@ superclass' view_paths. [Rick] * Accept multipart PUT parameters. #5235 [guy.naor@famundo.com] -* Added interrogation of params[:format] to determine Accept type. If :format is specified and matches a declared extension, like "rss" or "xml", that mime type will be put in front of the accept handler. This means you can link to the same action from different extensions and use that fact to determine output [DHH]. Example: +* Added interrogation of params[:format] to determine Accept type. If :format is specified and matches a declared extension, like "rss" or "xml", that mime type will be put in front of the accept handler. This means you can link to the same action from different extensions and use that fact to determine output [David Heinemeier Hansson]. Example: class WeblogController < ActionController::Base def index @@ -1856,13 +1856,13 @@ superclass' view_paths. [Rick] All this relies on the fact that you have a route that includes .:format. -* Expanded :method option in FormTagHelper#form_tag, FormHelper#form_for, PrototypeHelper#remote_form_for, PrototypeHelper#remote_form_tag, and PrototypeHelper#link_to_remote to allow for verbs other than GET and POST by automatically creating a hidden form field named _method, which will simulate the other verbs over post [DHH] +* Expanded :method option in FormTagHelper#form_tag, FormHelper#form_for, PrototypeHelper#remote_form_for, PrototypeHelper#remote_form_tag, and PrototypeHelper#link_to_remote to allow for verbs other than GET and POST by automatically creating a hidden form field named _method, which will simulate the other verbs over post [David Heinemeier Hansson] -* Added :method option to UrlHelper#link_to, which allows for using other verbs than GET for the link. This replaces the :post option, which is now deprecated. Example: link_to "Destroy", person_url(:id => person), :method => :delete [DHH] +* Added :method option to UrlHelper#link_to, which allows for using other verbs than GET for the link. This replaces the :post option, which is now deprecated. Example: link_to "Destroy", person_url(:id => person), :method => :delete [David Heinemeier Hansson] * follow_redirect doesn't complain about being redirected to the same controller. #5153 [dymo@mk.ukrtelecom.ua] -* Add layout attribute to response object with the name of the layout that was rendered, or nil if none rendered. [Kevin Clark kevin.clark@gmail.com] +* Add layout attribute to response object with the name of the layout that was rendered, or nil if none rendered. [Kevin Clark] * Fix NoMethodError when parsing params like &&. [Adam Greenfield] @@ -1872,7 +1872,7 @@ superclass' view_paths. [Rick] * Excise ingrown code from FormOptionsHelper#options_for_select. #5008 [anonymous] -* Small fix in routing to allow dynamic routes (broken after [4242]) [Rick] +* Small fix in routing to allow dynamic routes (broken after [4242]) [Rick Olson] map.connect '*path', :controller => 'files', :action => 'show' @@ -1884,7 +1884,7 @@ superclass' view_paths. [Rick] * Documentation fix: integration test scripts don't require integration_test. Closes #4914. [Frederick Ros <sl33p3r@free.fr>] -* ActionController::Base Summary documentation rewrite. Closes #4900. [kevin.clark@gmail.com] +* ActionController::Base Summary documentation rewrite. Closes #4900. [Kevin Clark] * Fix text_helper.rb documentation rendering. Closes #4725. [Frederick Ros] @@ -1896,9 +1896,9 @@ superclass' view_paths. [Rick] * Enhance documentation for setting headers in integration tests. Skip auto HTTP prepending when its already there. Closes #4079. [Rick Olson] -* Documentation for AbstractRequest. Closes #4895. [kevin.clark@gmail.com] +* Documentation for AbstractRequest. Closes #4895. [Kevin Clark] -* Refactor various InstanceTag instance method to class methods. Closes #4800. [skaes@web.de] +* Refactor various InstanceTag instance method to class methods. Closes #4800. [Stefan Kaes] * Remove all remaining references to @params in the documentation. [Marcel Molina Jr.] @@ -1906,25 +1906,25 @@ superclass' view_paths. [Rick] * Update layout and content_for documentation to use yield rather than magic @content_for instance variables. [Marcel Molina Jr.] -* Fix assert_redirected_to tests according to real-world usage. Also, don't fail if you add an extra :controller option: [Rick] +* Fix assert_redirected_to tests according to real-world usage. Also, don't fail if you add an extra :controller option: [Rick Olson] redirect_to :action => 'new' assert_redirected_to :controller => 'monkeys', :action => 'new' -* Cache CgiRequest#request_parameters so that multiple calls don't re-parse multipart data. [Rick] +* Cache CgiRequest#request_parameters so that multiple calls don't re-parse multipart data. [Rick Olson] -* Diff compared routing options. Allow #assert_recognizes to take a second arg as a hash to specify optional request method [Rick] +* Diff compared routing options. Allow #assert_recognizes to take a second arg as a hash to specify optional request method [Rick Olson] assert_recognizes({:controller => 'users', :action => 'index'}, 'users') assert_recognizes({:controller => 'users', :action => 'create'}, {:path => 'users', :method => :post}) -* Diff compared options with #assert_redirected_to [Rick] +* Diff compared options with #assert_redirected_to [Rick Olson] * Add support in routes for semicolon delimited "subpaths", like /books/:id;:action [Jamis Buck] * Change link_to_function and button_to_function to (optionally) take an update_page block instead of a JavaScript string. Closes #4804. [zraii@comcast.net, Sam Stephenson] -* Fixed that remote_form_for can leave out the object parameter and default to the instance variable of the object_name, just like form_for [DHH] +* Fixed that remote_form_for can leave out the object parameter and default to the instance variable of the object_name, just like form_for [David Heinemeier Hansson] * Modify routing so that you can say :require => { :method => :post } for a route, and the route will never be selected unless the request method is POST. Only works for route recognition, not for route generation. [Jamis Buck] @@ -1940,14 +1940,14 @@ superclass' view_paths. [Rick] * Apply [5709] to stable. -* session_enabled? works with session :off. #6680 [Catfish] +* session_enabled? works with session :off. #6680 [Jonathan del Strother] * Performance: patch cgi/session to require digest/md5 once rather than per #create_new_id. [Stefan Kaes] *1.13.2* (February 5th, 2007) -* Add much-needed html-scanner tests. Fixed CDATA parsing bug. [Rick] +* Add much-needed html-scanner tests. Fixed CDATA parsing bug. [Rick Olson] * improve error message for Routing for named routes. [Rob Sanheim] @@ -1969,7 +1969,7 @@ superclass' view_paths. [Rick] * Make TextHelper::auto_link recognize URLs with colons in path correctly, fixes #7268. [imajes] -* Improved auto_link to match more valid urls correctly [Tobias Luetke] +* Improved auto_link to match more valid urls correctly [Tobias Lütke] *1.13.1* (January 18th, 2007) @@ -1985,11 +1985,11 @@ superclass' view_paths. [Rick] * Update to Prototype 1.5.0. [Sam Stephenson] -* Allow exempt_from_layout :rhtml. #6742, #7026 [dcmanges, Squeegy] +* Allow exempt_from_layout :rhtml. #6742, #7026 [Dan Manges, Squeegy] * Fix parsing of array[] CGI parameters so extra empty values aren't included. #6252 [Nicholas Seckar, aiwilliams, brentrowland] -* link_to_unless_current works with full URLs as well as paths. #6891 [Jarkko Laine, manfred, idrifter] +* link_to_unless_current works with full URLs as well as paths. #6891 [Jarkko Laine, Manfred Stienstra, idrifter] * Fix HTML::Node to output double quotes instead of single quotes. Closes #6845 [mitreandy] @@ -2031,7 +2031,7 @@ superclass' view_paths. [Rick] * Add :index and @auto_index capability to model driven date/time selects. #847, #2655 [moriq, Doug Fales, Bob Silva] -* Add :order to datetime_select, select_datetime, and select_date. #1427 [Timothee Peignier, patrick@lenz.sh, Bob Silva] +* Add :order to datetime_select, select_datetime, and select_date. #1427 [Timothee Peignier, Patrick Lenz, Bob Silva] * Added time_select to work with time values in models. Update scaffolding. #2489, #2833 [Justin Palmer, Andre Caum, Bob Silva] @@ -2043,9 +2043,9 @@ superclass' view_paths. [Rick] * @response.redirect_url works with 201 Created responses: just return headers['Location'] rather than checking the response status. [Jeremy Kemper] -* Fixed that HEAD should return the proper Content-Length header (that is, actually use @body.size, not just 0) [DHH] +* Fixed that HEAD should return the proper Content-Length header (that is, actually use @body.size, not just 0) [David Heinemeier Hansson] -* Added GET-masquarading for HEAD, so request.method will return :get even for HEADs. This will help anyone relying on case request.method to automatically work with HEAD and map.resources will also allow HEADs to all GET actions. Rails automatically throws away the response content in a reply to HEAD, so you don't even need to worry about that. If you, for whatever reason, still need to distinguish between GET and HEAD in some edge case, you can use Request#head? and even Request.headers["REQUEST_METHOD"] for get the "real" answer. Closes #6694 [DHH] +* Added GET-masquarading for HEAD, so request.method will return :get even for HEADs. This will help anyone relying on case request.method to automatically work with HEAD and map.resources will also allow HEADs to all GET actions. Rails automatically throws away the response content in a reply to HEAD, so you don't even need to worry about that. If you, for whatever reason, still need to distinguish between GET and HEAD in some edge case, you can use Request#head? and even Request.headers["REQUEST_METHOD"] for get the "real" answer. Closes #6694 [David Heinemeier Hansson] *1.13.0 RC1* (r5619, November 22nd, 2006) @@ -2085,13 +2085,13 @@ superclass' view_paths. [Rick] * Deprecate expire_matched_fragments. Use expire_fragment instead. #6535 [Bob Silva] -* Deprecate start_form_tag and end_form_tag. Use form_tag / '</form>' from now on. [Rick] +* Deprecate start_form_tag and end_form_tag. Use form_tag / '</form>' from now on. [Rick Olson] -* Added block-usage to PrototypeHelper#form_remote_tag, document block-usage of FormTagHelper#form_tag [Rick] +* Added block-usage to PrototypeHelper#form_remote_tag, document block-usage of FormTagHelper#form_tag [Rick Olson] -* Add a 0 margin/padding div around the hidden _method input tag that form_tag outputs. [Rick] +* Add a 0 margin/padding div around the hidden _method input tag that form_tag outputs. [Rick Olson] -* Added block-usage to TagHelper#content_tag [DHH]. Example: +* Added block-usage to TagHelper#content_tag [David Heinemeier Hansson]. Example: <% content_tag :div, :class => "strong" %> Hello world! @@ -2100,13 +2100,13 @@ superclass' view_paths. [Rick] Will output: <div class="strong">Hello world!</div> -* Deprecated UrlHelper#link_to_image and UrlHelper#link_to :post => true #6409 [BobSilva] +* Deprecated UrlHelper#link_to_image and UrlHelper#link_to :post => true #6409 [Bob Silva] -* Upgraded NumberHelper with number_to_phone support international formats to comply with ITU E.123 by supporting area codes with less than 3 digits, added precision argument to number_to_human_size (defaults to 1) #6421 [BobSilva] +* Upgraded NumberHelper with number_to_phone support international formats to comply with ITU E.123 by supporting area codes with less than 3 digits, added precision argument to number_to_human_size (defaults to 1) #6421 [Bob Silva] -* Fixed that setting RAILS_ASSET_ID to "" should not add a trailing slash after assets #6454 [BobSilva/chrismear] +* Fixed that setting RAILS_ASSET_ID to "" should not add a trailing slash after assets #6454 [Bob Silva/chrismear] -* Force *_url named routes to show the host in ActionView [Rick] +* Force *_url named routes to show the host in ActionView [Rick Olson] <%= url_for ... %> # no host <%= foo_path %> # no host @@ -2116,9 +2116,9 @@ superclass' view_paths. [Rick] * Add JavaScriptGenerator#literal for wrapping a string in an object whose #to_json is the string itself. [Sam Stephenson] -* Add <%= escape_once html %> to escape html while leaving any currently escaped entities alone. Fix button_to double-escaping issue. [Rick] +* Add <%= escape_once html %> to escape html while leaving any currently escaped entities alone. Fix button_to double-escaping issue. [Rick Olson] -* Fix double-escaped entities, such as &amp;, &#123;, etc. [Rick] +* Fix double-escaped entities, such as &amp;, &#123;, etc. [Rick Olson] * Fix routing to correctly determine when generation fails. Closes #6300. [psross]. @@ -2138,7 +2138,7 @@ superclass' view_paths. [Rick] * Rename test assertion to prevent shadowing. Closes #6306. [psross] -* Fixed that NumberHelper#number_to_delimiter should respect precision of higher than two digits #6231 [phallstrom] +* Fixed that NumberHelper#number_to_delimiter should respect precision of higher than two digits #6231 [Philip Hallstrom] * Fixed that FormHelper#radio_button didn't respect an :id being passed in #6266 [evansj] @@ -2152,7 +2152,7 @@ superclass' view_paths. [Rick] Which is needed for dealing with the IE6 DOM when it's not yet fully loaded. -* Fixed that rescue template path shouldn't be hardcoded, then it's easier to hook in your own #6295 [mnaberez] +* Fixed that rescue template path shouldn't be hardcoded, then it's easier to hook in your own #6295 [Mike Naberezny] * Fixed escaping of backslashes in JavaScriptHelper#escape_javascript #6302 [sven@c3d2.de] @@ -2191,7 +2191,7 @@ superclass' view_paths. [Rick] * Rescue Errno::ECONNRESET to handle an unexpectedly closed socket connection. Improves SCGI reliability. #3368, #6226 [sdsykes, fhanshaw@vesaria.com] -* Added that respond_to blocks will automatically set the content type to be the same as is requested [DHH]. Examples: +* Added that respond_to blocks will automatically set the content type to be the same as is requested [David Heinemeier Hansson]. Examples: respond_to do |format| format.html { render :text => "I'm being sent as text/html" } @@ -2199,9 +2199,9 @@ superclass' view_paths. [Rick] format.atom { render :text => "I'm being sent as application/xml", :content_type => Mime::XML } end -* Added utf-8 as the default charset for all renders. You can change this default using ActionController::Base.default_charset=(encoding) [DHH] +* Added utf-8 as the default charset for all renders. You can change this default using ActionController::Base.default_charset=(encoding) [David Heinemeier Hansson] -* Added proper getters and setters for content type and charset [DHH]. Example of what we used to do: +* Added proper getters and setters for content type and charset [David Heinemeier Hansson]. Example of what we used to do: response.headers["Content-Type"] = "application/atom+xml; charset=utf-8" @@ -2230,7 +2230,7 @@ superclass' view_paths. [Rick] * Load helpers in alphabetical order for consistency. Resolve cyclic javascript_helper dependency. #6132, #6178 [choonkeat@gmail.com] -* Skip params with empty names, such as the &=Save query string from <input type="submit"/>. #2569 [manfred, raphinou@yahoo.com] +* Skip params with empty names, such as the &=Save query string from <input type="submit"/>. #2569 [Manfred Stienstra, raphinou@yahoo.com] * Fix assert_tag so that :content => "foo" does not match substrings, but only exact strings. Use :content => /foo/ to match substrings. #2799 [Eric Hodel] @@ -2238,7 +2238,7 @@ superclass' view_paths. [Rick] * Update UrlWriter to support :only_path. [Nicholas Seckar, Dave Thomas] -* Fixed JavaScriptHelper#link_to_function and JavaScriptHelper#button_to_function to have the script argument be optional [DHH]. So what used to require a nil, like this: +* Fixed JavaScriptHelper#link_to_function and JavaScriptHelper#button_to_function to have the script argument be optional [David Heinemeier Hansson]. So what used to require a nil, like this: link_to("Hider", nil, :class => "hider_link") { |p| p[:something].hide } @@ -2255,7 +2255,7 @@ superclass' view_paths. [Rick] * Fixed that AssetTagHelper#image_tag and others using compute_public_path should not modify the incoming source argument (closes #5102) [eule@space.ch] -* Deprecated the auto-appending of .png to AssetTagHelper#image_tag calls that doesn't have an extension [DHH] +* Deprecated the auto-appending of .png to AssetTagHelper#image_tag calls that doesn't have an extension [David Heinemeier Hansson] * Fixed FormOptionsHelper#select to respect :selected value #5813 @@ -2265,13 +2265,13 @@ superclass' view_paths. [Rick] * Improved resolution of DateHelper#distance_of_time_in_words for better precision #5994 [Bob Silva] -* Changed that uncaught exceptions raised any where in the application will cause RAILS_ROOT/public/500.html to be read and shown instead of just the static "Application error (Rails)" [DHH] +* Changed that uncaught exceptions raised any where in the application will cause RAILS_ROOT/public/500.html to be read and shown instead of just the static "Application error (Rails)" [David Heinemeier Hansson] -* Added deprecation language for pagination which will become a plugin by Rails 2.0 [DHH] +* Added deprecation language for pagination which will become a plugin by Rails 2.0 [David Heinemeier Hansson] -* Added deprecation language for in_place_editor and auto_complete_field that both pieces will become plugins by Rails 2.0 [DHH] +* Added deprecation language for in_place_editor and auto_complete_field that both pieces will become plugins by Rails 2.0 [David Heinemeier Hansson] -* Deprecated all of ActionController::Dependencies. All dependency loading is now handled from Active Support [DHH] +* Deprecated all of ActionController::Dependencies. All dependency loading is now handled from Active Support [David Heinemeier Hansson] * Added assert_select* for CSS selector-based testing (deprecates assert_tag) #5936 [assaf.arkin@gmail.com] @@ -2291,9 +2291,9 @@ superclass' view_paths. [Rick] * Integration tests: headers beginning with X aren't excluded from the HTTP_ prefix, so X-Requested-With becomes HTTP_X_REQUESTED_WITH as expected. [Mike Clark] -* Switch to using FormEncodedPairParser for parsing request parameters. [Nicholas Seckar, DHH] +* Switch to using FormEncodedPairParser for parsing request parameters. [Nicholas Seckar, David Heinemeier Hansson] -* respond_to .html now always renders #{action_name}.rhtml so that registered custom template handlers do not override it in priority. Custom mime types require a block and throw proper error now. [Tobias Luetke] +* respond_to .html now always renders #{action_name}.rhtml so that registered custom template handlers do not override it in priority. Custom mime types require a block and throw proper error now. [Tobias Lütke] * Deprecation: test deprecated instance vars in partials. [Jeremy Kemper] @@ -2319,7 +2319,7 @@ superclass' view_paths. [Rick] * Deprecation! @params, @session, @flash will be removed after 1.2. Use the corresponding instance methods instead. You'll get printed warnings during tests and logged warnings in dev mode when you access either instance variable directly. [Jeremy Kemper] -* Make Routing noisy when an anchor regexp is assigned to a segment. #5674 [francois.beausoleil@gmail.com] +* Make Routing noisy when an anchor regexp is assigned to a segment. #5674 [François Beausoleil] * Added months and years to the resolution of DateHelper#distance_of_time_in_words, such that "60 days ago" becomes "2 months ago" #5611 [pjhyett@gmail.com] @@ -2333,7 +2333,7 @@ superclass' view_paths. [Rick] * Fixed the new_#{resource}_url route and added named route tests for Simply Restful. [Rick Olson] -* Added map.resources from the Simply Restful plugin [DHH]. Examples (the API has changed to use plurals!): +* Added map.resources from the Simply Restful plugin [David Heinemeier Hansson]. Examples (the API has changed to use plurals!): map.resources :messages map.resources :messages, :comments @@ -2341,13 +2341,13 @@ superclass' view_paths. [Rick] * Fixed that integration simulation of XHRs should set Accept header as well [Edward Frederick] -* TestRequest#reset_session should restore a TestSession, not a hash [Koz] +* TestRequest#reset_session should restore a TestSession, not a hash [Michael Koziarski] * Don't search a load-path of '.' for controller files [Jamis Buck] * Update integration.rb to require test_process explicitly instead of via Dependencies. [Nicholas Seckar] -* Fixed that you can still access the flash after the flash has been reset in reset_session. Closes #5584 [lmarlow@yahoo.com] +* Fixed that you can still access the flash after the flash has been reset in reset_session. Closes #5584 [lmarlow] * Allow form_for and fields_for to work with indexed form inputs. [Jeremy Kemper, Matt Lyon] @@ -2356,11 +2356,11 @@ superclass' view_paths. [Rick] * Remove leak in development mode by replacing define_method with module_eval. [Nicholas Seckar] -* Provide support for decimal columns to form helpers. Closes #5672. [dave@pragprog.com] +* Provide support for decimal columns to form helpers. Closes #5672. [Dave Thomas] * Pass :id => nil or :class => nil to error_messages_for to supress that html attribute. #3586 [olivier_ansaldi@yahoo.com, sebastien@goetzilla.info] -* Reset @html_document between requests so assert_tag works. #4810 [jarkko@jlaine.net, easleydp@gmail.com] +* Reset @html_document between requests so assert_tag works. #4810 [Jarkko Laine, easleydp@gmail.com] * Integration tests behave well with render_component. #4632 [edward.frederick@revolution.com, dev.rubyonrails@maxdunn.com] @@ -2368,21 +2368,21 @@ superclass' view_paths. [Rick] * Fixed that real files and symlinks should be treated the same when compiling templates #5438 [zachary@panandscan.com] -* Fixed that the flash should be reset when reset_session is called #5584 [shugo@ruby-lang.org] +* Fixed that the flash should be reset when reset_session is called #5584 [Shugo Maeda] * Added special case for "1 Byte" in NumberHelper#number_to_human_size #5593 [murpyh@rubychan.de] -* Fixed proper form-encoded parameter parsing for requests with "Content-Type: application/x-www-form-urlencoded; charset=utf-8" (note the presence of a charset directive) [DHH] +* Fixed proper form-encoded parameter parsing for requests with "Content-Type: application/x-www-form-urlencoded; charset=utf-8" (note the presence of a charset directive) [David Heinemeier Hansson] * Add route_name_path method to generate only the path for a named routes. For example, map.person will add person_path. [Nicholas Seckar] * Avoid naming collision among compiled view methods. [Jeremy Kemper] -* Fix CGI extensions when they expect string but get nil in Windows. Closes #5276 [mislav@nippur.irb.hr] +* Fix CGI extensions when they expect string but get nil in Windows. Closes #5276 [Mislav Marohnić] * Determine the correct template_root for deeply nested components. #2841 [s.brink@web.de] -* Fix that routes with *path segments in the recall can generate URLs. [Rick] +* Fix that routes with *path segments in the recall can generate URLs. [Rick Olson] * Fix strip_links so that it doesn't hang on multiline <acronym> tags [Jamis Buck] @@ -2398,11 +2398,11 @@ superclass' view_paths. [Rick] * Rewind readable CGI params so others may reread them (such as CGI::Session when passing the session id in a multipart form). #210 [mklame@atxeu.com, matthew@walker.wattle.id.au] -* Added Mime::TEXT (text/plain) and Mime::ICS (text/calendar) as new default types [DHH] +* Added Mime::TEXT (text/plain) and Mime::ICS (text/calendar) as new default types [David Heinemeier Hansson] -* Added Mime::Type.register(string, symbol, synonyms = []) for adding new custom mime types [DHH]. Example: Mime::Type.register("image/gif", :gif) +* Added Mime::Type.register(string, symbol, synonyms = []) for adding new custom mime types [David Heinemeier Hansson]. Example: Mime::Type.register("image/gif", :gif) -* Added support for Mime objects in render :content_type option [DHH]. Example: render :text => some_atom, :content_type => Mime::ATOM +* Added support for Mime objects in render :content_type option [David Heinemeier Hansson]. Example: render :text => some_atom, :content_type => Mime::ATOM * Add :status option to send_data and send_file. Defaults to '200 OK'. #5243 [Manfred Stienstra <m.stienstra@fngtps.com>] @@ -2416,7 +2416,7 @@ superclass' view_paths. [Rick] * Accept multipart PUT parameters. #5235 [guy.naor@famundo.com] -* Added interrogation of params[:format] to determine Accept type. If :format is specified and matches a declared extension, like "rss" or "xml", that mime type will be put in front of the accept handler. This means you can link to the same action from different extensions and use that fact to determine output [DHH]. Example: +* Added interrogation of params[:format] to determine Accept type. If :format is specified and matches a declared extension, like "rss" or "xml", that mime type will be put in front of the accept handler. This means you can link to the same action from different extensions and use that fact to determine output [David Heinemeier Hansson]. Example: class WeblogController < ActionController::Base def index @@ -2449,13 +2449,13 @@ superclass' view_paths. [Rick] All this relies on the fact that you have a route that includes .:format. -* Expanded :method option in FormTagHelper#form_tag, FormHelper#form_for, PrototypeHelper#remote_form_for, PrototypeHelper#remote_form_tag, and PrototypeHelper#link_to_remote to allow for verbs other than GET and POST by automatically creating a hidden form field named _method, which will simulate the other verbs over post [DHH] +* Expanded :method option in FormTagHelper#form_tag, FormHelper#form_for, PrototypeHelper#remote_form_for, PrototypeHelper#remote_form_tag, and PrototypeHelper#link_to_remote to allow for verbs other than GET and POST by automatically creating a hidden form field named _method, which will simulate the other verbs over post [David Heinemeier Hansson] -* Added :method option to UrlHelper#link_to, which allows for using other verbs than GET for the link. This replaces the :post option, which is now deprecated. Example: link_to "Destroy", person_url(:id => person), :method => :delete [DHH] +* Added :method option to UrlHelper#link_to, which allows for using other verbs than GET for the link. This replaces the :post option, which is now deprecated. Example: link_to "Destroy", person_url(:id => person), :method => :delete [David Heinemeier Hansson] * follow_redirect doesn't complain about being redirected to the same controller. #5153 [dymo@mk.ukrtelecom.ua] -* Add layout attribute to response object with the name of the layout that was rendered, or nil if none rendered. [Kevin Clark kevin.clark@gmail.com] +* Add layout attribute to response object with the name of the layout that was rendered, or nil if none rendered. [Kevin Clark] * Fix NoMethodError when parsing params like &&. [Adam Greenfield] @@ -2463,7 +2463,7 @@ superclass' view_paths. [Rick] * Excise ingrown code from FormOptionsHelper#options_for_select. #5008 [anonymous] -* Small fix in routing to allow dynamic routes (broken after [4242]) [Rick] +* Small fix in routing to allow dynamic routes (broken after [4242]) [Rick Olson] map.connect '*path', :controller => 'files', :action => 'show' @@ -2473,17 +2473,17 @@ superclass' view_paths. [Rick] error_messages_for :account, :user, :subscription, :object_name => :account -* Fix assert_redirected_to tests according to real-world usage. Also, don't fail if you add an extra :controller option: [Rick] +* Fix assert_redirected_to tests according to real-world usage. Also, don't fail if you add an extra :controller option: [Rick Olson] redirect_to :action => 'new' assert_redirected_to :controller => 'monkeys', :action => 'new' -* Diff compared routing options. Allow #assert_recognizes to take a second arg as a hash to specify optional request method [Rick] +* Diff compared routing options. Allow #assert_recognizes to take a second arg as a hash to specify optional request method [Rick Olson] assert_recognizes({:controller => 'users', :action => 'index'}, 'users') assert_recognizes({:controller => 'users', :action => 'create'}, {:path => 'users', :method => :post}) -* Diff compared options with #assert_redirected_to [Rick] +* Diff compared options with #assert_redirected_to [Rick Olson] * Add support in routes for semicolon delimited "subpaths", like /books/:id;:action [Jamis Buck] @@ -2504,9 +2504,9 @@ superclass' view_paths. [Rick] *1.12.4* (August 8th, 2006) -* Cache CgiRequest#request_parameters so that multiple calls don't re-parse multipart data. [Rick] +* Cache CgiRequest#request_parameters so that multiple calls don't re-parse multipart data. [Rick Olson] -* Fixed that remote_form_for can leave out the object parameter and default to the instance variable of the object_name, just like form_for [DHH] +* Fixed that remote_form_for can leave out the object parameter and default to the instance variable of the object_name, just like form_for [David Heinemeier Hansson] * Added ActionController.filter_parameter_logging that makes it easy to remove passwords, credit card numbers, and other sensitive information from being logged when a request is handled. #1897 [jeremye@bsa.ca.gov] @@ -2547,7 +2547,7 @@ superclass' view_paths. [Rick] * Update the diagnostics template skip the useless '<controller not set>' text. [Nicholas Seckar] -* CHANGED DEFAULT: Don't parse YAML input by default, but keep it available as an easy option [DHH] +* CHANGED DEFAULT: Don't parse YAML input by default, but keep it available as an easy option [David Heinemeier Hansson] * Add additional autocompleter options [aballai, Thomas Fuchs] @@ -2555,7 +2555,7 @@ superclass' view_paths. [Rick] * Applied Prototype $() performance patches (#4465, #4477) and updated script.aculo.us [Sam Stephenson, Thomas Fuchs] -* Added automated timestamping to AssetTagHelper methods for stylesheets, javascripts, and images when Action Controller is run under Rails [DHH]. Example: +* Added automated timestamping to AssetTagHelper methods for stylesheets, javascripts, and images when Action Controller is run under Rails [David Heinemeier Hansson]. Example: image_tag("rails.png") # => '<img alt="Rails" src="/images/rails.png?1143664135" />' @@ -2589,9 +2589,9 @@ superclass' view_paths. [Rick] * Fix double url escaping of remote_function. Add :escape => false option to ActionView's url_for. [Nicholas Seckar] -* Add :script option to in_place_editor to support evalScripts (closes #4194) [codyfauser@gmail.com] +* Add :script option to in_place_editor to support evalScripts (closes #4194) [Cody Fauser] -* Fix mixed case enumerable methods in the JavaScript Collection Proxy (closes #4314) [codyfauser@gmail.com] +* Fix mixed case enumerable methods in the JavaScript Collection Proxy (closes #4314) [Cody Fauser] * Undo accidental escaping for mail_to; add regression test. [Nicholas Seckar] @@ -2626,9 +2626,9 @@ superclass' view_paths. [Rick] * XML-formatted requests are typecast according to "type" attributes for :xml_simple [Jamis Buck] -* Added protection against proxy setups treating requests as local even when they're not #3898 [stephen_purcell@yahoo.com] +* Added protection against proxy setups treating requests as local even when they're not #3898 [Steve Purcell] -* Added TestRequest#raw_post that simulate raw_post from CgiRequest #3042 [francois.beausoleil@gmail.com] +* Added TestRequest#raw_post that simulate raw_post from CgiRequest #3042 [François Beausoleil] * Underscore dasherized keys in formatted requests [Jamis Buck] @@ -2644,11 +2644,11 @@ superclass' view_paths. [Rick] * Added simple alert() notifications for RJS exceptions when config.action_view.debug_rjs = true. [Sam Stephenson] -* Added :content_type option to render, so you can change the content type on the fly [DHH]. Example: render :action => "atom.rxml", :content_type => "application/atom+xml" +* Added :content_type option to render, so you can change the content type on the fly [David Heinemeier Hansson]. Example: render :action => "atom.rxml", :content_type => "application/atom+xml" -* CHANGED DEFAULT: The default content type for .rxml is now application/xml instead of type/xml, see http://www.xml.com/pub/a/2004/07/21/dive.html for reason [DHH] +* CHANGED DEFAULT: The default content type for .rxml is now application/xml instead of type/xml, see http://www.xml.com/pub/a/2004/07/21/dive.html for reason [David Heinemeier Hansson] -* Added option to render action/template/file of a specific extension (and here by template type). This means you can have multiple templates with the same name but a different extension [DHH]. Example: +* Added option to render action/template/file of a specific extension (and here by template type). This means you can have multiple templates with the same name but a different extension [David Heinemeier Hansson]. Example: class WeblogController < ActionController::Base def index @@ -2662,7 +2662,7 @@ superclass' view_paths. [Rick] end end -* Added better support for using the same actions to output for different sources depending on the Accept header [DHH]. Example: +* Added better support for using the same actions to output for different sources depending on the Accept header [David Heinemeier Hansson]. Example: class WeblogController < ActionController::Base def create @@ -2679,9 +2679,9 @@ superclass' view_paths. [Rick] end end -* Added Base#render(:xml => xml) that works just like Base#render(:text => text), but sets the content-type to text/xml and the charset to UTF-8 [DHH] +* Added Base#render(:xml => xml) that works just like Base#render(:text => text), but sets the content-type to text/xml and the charset to UTF-8 [David Heinemeier Hansson] -* Integration test's url_for now runs in the context of the last request (if any) so after post /products/show/1 url_for :action => 'new' will yield /product/new [Tobias Luetke] +* Integration test's url_for now runs in the context of the last request (if any) so after post /products/show/1 url_for :action => 'new' will yield /product/new [Tobias Lütke] * Re-added mixed-in helper methods for the JavascriptGenerator. Moved JavascriptGenerators methods to a module that is mixed in after the helpers are added. Also fixed that variables set in the enumeration methods like #collect are set correctly. Documentation added for the enumeration methods [Rick Olson]. Examples: @@ -2701,7 +2701,7 @@ superclass' view_paths. [Rick] # Assign the default XmlSimple to a new content type ActionController::Base.param_parsers['application/backpack+xml'] = :xml_simple -Default YAML web services were retired, ActionController::Base.param_parsers carries an example which shows how to get this functionality back. As part of this new plugin support, request.[formatted_post?, xml_post?, yaml_post? and post_format] were all deprecated in favor of request.content_type [Tobias Luetke] +Default YAML web services were retired, ActionController::Base.param_parsers carries an example which shows how to get this functionality back. As part of this new plugin support, request.[formatted_post?, xml_post?, yaml_post? and post_format] were all deprecated in favor of request.content_type [Tobias Lütke] * Fixed Effect.Appear in effects.js to work with floats in Safari #3524, #3813, #3044 [Thomas Fuchs] @@ -2731,11 +2731,11 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added various InPlaceEditor options, #3746, #3891, #3896, #3906 [Bill Burcham, ruairi, sl33p3r] -* Added :count option to pagination that'll make it possible for the ActiveRecord::Base.count call to using something else than * for the count. Especially important for count queries using DISTINCT #3839 [skaes] +* Added :count option to pagination that'll make it possible for the ActiveRecord::Base.count call to using something else than * for the count. Especially important for count queries using DISTINCT #3839 [Stefan Kaes] * Update script.aculo.us to V1.5.2 [Thomas Fuchs] -* Added element and collection proxies to RJS [DHH]. Examples: +* Added element and collection proxies to RJS [David Heinemeier Hansson]. Examples: page['blank_slate'] # => $('blank_slate'); page['blank_slate'].show # => $('blank_slate').show(); @@ -2781,7 +2781,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Document the :xhr option for verifications. #3666 [leeo] -* Added :only and :except controls to skip_before/after_filter just like for when you add filters [DHH] +* Added :only and :except controls to skip_before/after_filter just like for when you add filters [David Heinemeier Hansson] * Ensure that the instance variables are copied to the template when performing render :update. [Nicholas Seckar] @@ -2803,13 +2803,13 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fix render(:update) to not render layouts. [Sam Stephenson] -* Fixed that SSL would not correctly be detected when running lighttpd/fcgi behind lighttpd w/mod_proxy #3548 [stephen_purcell@yahoo.com] +* Fixed that SSL would not correctly be detected when running lighttpd/fcgi behind lighttpd w/mod_proxy #3548 [Steve Purcell] * Added the possibility to specify atomatic expiration for the memcachd session container #3571 [Stefan Kaes] * Change layout discovery to take into account the change in semantics with File.join and nil arguments. [Marcel Molina Jr.] -* Raise a RedirectBackError if redirect_to :back is called when there's no HTTP_REFERER defined #3049 [kevin.clark@gmail.com] +* Raise a RedirectBackError if redirect_to :back is called when there's no HTTP_REFERER defined #3049 [Kevin Clark] * Treat timestamps like datetimes for scaffolding purposes #3388 [Maik Schmidt] @@ -2849,15 +2849,15 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Have the form builder output radio button, not check box, when calling the radio button helper. #3331 [LouisStAmour@gmail.com] -* Added assignment of the Autocompleter object created by JavaScriptMacroHelper#auto_complete_field to a local javascript variables [DHH] +* Added assignment of the Autocompleter object created by JavaScriptMacroHelper#auto_complete_field to a local javascript variables [David Heinemeier Hansson] -* Added :on option for PrototypeHelper#observe_field that allows you to specify a different callback hook to have the observer trigger on [DHH] +* Added :on option for PrototypeHelper#observe_field that allows you to specify a different callback hook to have the observer trigger on [David Heinemeier Hansson] -* Added JavaScriptHelper#button_to_function that works just like JavaScriptHelper#link_to_function but uses a button instead of a href [DHH] +* Added JavaScriptHelper#button_to_function that works just like JavaScriptHelper#link_to_function but uses a button instead of a href [David Heinemeier Hansson] -* Added that JavaScriptHelper#link_to_function will honor existing :onclick definitions when adding the function call [DHH] +* Added that JavaScriptHelper#link_to_function will honor existing :onclick definitions when adding the function call [David Heinemeier Hansson] -* Added :disable_with option to FormTagHelper#submit_tag to allow for easily disabled submit buttons with different text [DHH] +* Added :disable_with option to FormTagHelper#submit_tag to allow for easily disabled submit buttons with different text [David Heinemeier Hansson] * Make auto_link handle nil by returning quickly if blank? [Scott Barron] @@ -2875,7 +2875,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car page.visual_effect :fade, 'notice' end -* Add session ID to default logging, but remove the verbose description of every step [DHH] +* Add session ID to default logging, but remove the verbose description of every step [David Heinemeier Hansson] * Add the following RJS methods: [Sam Stephenson] @@ -2897,7 +2897,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Update to Prototype 1.4.0 final [Sam Stephenson] -* Added form_remote_for (form_for meets form_remote_tag) [DHH] +* Added form_remote_for (form_for meets form_remote_tag) [David Heinemeier Hansson] * Update to script.aculo.us 1.5.0_rc6 @@ -2905,7 +2905,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fix docs for text_area_tag. #3083. [Christopher Cotton] -* Change form_for and fields_for method signatures to take object name and object as separate arguments rather than as a Hash. [DHH] +* Change form_for and fields_for method signatures to take object name and object as separate arguments rather than as a Hash. [David Heinemeier Hansson] * Introduce :selected option to the select helper. Allows you to specify a selection other than the current value of object.method. Specify :selected => nil to leave all options unselected. #2991 [Jonathan Viney <jonathan@bluewire.net.nz>] @@ -2923,7 +2923,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Pass multiple arguments to Element.show and Element.hide in JavaScriptGenerator instead of using iterators. [Sam Stephenson] -* Improve expire_fragment documentation. #2966 [court3nay@gmail.com] +* Improve expire_fragment documentation. #2966 [court3nay] * Correct docs for automatic layout assignment. #2610. [Charles M. Gerungan] @@ -2945,7 +2945,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Correct time_zone_options_for_select docs. #2892 [pudeyo@rpi.com] -* Remove the unused, slow response_dump and session_dump variables from error pages. #1222 [lmarlow@yahoo.com] +* Remove the unused, slow response_dump and session_dump variables from error pages. #1222 [lmarlow] * Performance tweaks: use Set instead of Array to speed up prototype helper include? calls. Avoid logging code if logger is nil. Inline commonly-called template presence checks. #2880, #2881, #2882, #2883 [Stefan Kaes] @@ -2975,9 +2975,9 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Update documentation for render :file. #2858 [Tom Werner] -* Only include builtin filters whose filenames match /^[a-z][a-z_]*_helper.rb$/ to avoid including operating system metadata such as ._foo_helper.rb. #2855 [court3nay@gmail.com] +* Only include builtin filters whose filenames match /^[a-z][a-z_]*_helper.rb$/ to avoid including operating system metadata such as ._foo_helper.rb. #2855 [court3nay] -* Added FormHelper#form_for and FormHelper#fields_for that makes it easier to work with forms for single objects also if they don't reside in instance variables [DHH]. Examples: +* Added FormHelper#form_for and FormHelper#fields_for that makes it easier to work with forms for single objects also if they don't reside in instance variables [David Heinemeier Hansson]. Examples: <% form_for :person, @person, :url => { :action => "update" } do |f| %> First name: <%= f.text_field :first_name %> @@ -3010,7 +3010,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car *1.11.0* (November 7th, 2005) -* Added request as instance method to views, so you can do <%= request.env["HTTP_REFERER"] %>, just like you can already access response, session, and the likes [DHH] +* Added request as instance method to views, so you can do <%= request.env["HTTP_REFERER"] %>, just like you can already access response, session, and the likes [David Heinemeier Hansson] * Fix conflict with assert_tag and Glue gem #2255 [david.felstead@gmail.com] @@ -3018,9 +3018,9 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added action_pack.rb stub so that ActionPack::Version loads properly [Sam Stephenson] -* Added short-hand to assert_tag so assert_tag :tag => "span" can be written as assert_tag "span" [DHH] +* Added short-hand to assert_tag so assert_tag :tag => "span" can be written as assert_tag "span" [David Heinemeier Hansson] -* Added skip_before_filter/skip_after_filter for easier control of the filter chain in inheritance hierachies [DHH]. Example: +* Added skip_before_filter/skip_after_filter for easier control of the filter chain in inheritance hierachies [David Heinemeier Hansson]. Example: class ApplicationController < ActionController::Base before_filter :authenticate @@ -3035,7 +3035,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car skip_before_filter :authenticate end -* Added redirect_to :back as a short-hand for redirect_to(request.env["HTTP_REFERER"]) [DHH] +* Added redirect_to :back as a short-hand for redirect_to(request.env["HTTP_REFERER"]) [David Heinemeier Hansson] * Change javascript_include_tag :defaults to not use script.aculo.us loader, which facilitates the use of plugins for future script.aculo.us and third party javascript extensions, and provide register_javascript_include_default for plugins to specify additional JavaScript files to load. Removed slider.js and builder.js from actionpack. [Thomas Fuchs] @@ -3045,7 +3045,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Update script.aculo.us to V1.5_rc4 [Thomas Fuchs] -* Fix that render :text didn't interpolate instance variables #2629, #2626 [skaes] +* Fix that render :text didn't interpolate instance variables #2629, #2626 [Stefan Kaes] * Fix line number detection and escape RAILS_ROOT in backtrace Regexp [Nicholas Seckar] @@ -3064,7 +3064,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car *1.10.2* (October 26th, 2005) -* Reset template variables after using render_to_string [skaes@web.de] +* Reset template variables after using render_to_string [Stefan Kaes] * Expose the session model backing CGI::Session @@ -3080,7 +3080,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car *1.10.0* (October 16th, 2005) -* Make string-keys locals assigns optional. Add documentation describing depreciated state [skaes@web.de] +* Make string-keys locals assigns optional. Add documentation describing depreciated state [Stefan Kaes] * Improve line number detection for template errors [Nicholas Seckar] @@ -3088,7 +3088,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Upgrade to Prototype 1.4.0_rc0 [Sam Stephenson] -* Added assert_vaild. Reports the proper AR error messages as fail message when the passed record is invalid [Tobias Luetke] +* Added assert_vaild. Reports the proper AR error messages as fail message when the passed record is invalid [Tobias Lütke] * Add temporary support for passing locals to render using string keys [Nicholas Seckar] @@ -3096,11 +3096,11 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Raise an exception if an attempt is made to insert more session data into the ActiveRecordStore data column than the column can hold. #2234. [justin@textdrive.com] -* Removed references to assertions.rb from actionpack assert's backtraces. Makes error reports in functional unit tests much less noisy. [Tobias Luetke] +* Removed references to assertions.rb from actionpack assert's backtraces. Makes error reports in functional unit tests much less noisy. [Tobias Lütke] * Updated and clarified documentation for JavaScriptHelper to be more concise about the various options for including the JavaScript libs. [Thomas Fuchs] -* Hide "Retry with Breakpoint" button on error pages until feature is functional. [DHH] +* Hide "Retry with Breakpoint" button on error pages until feature is functional. [David Heinemeier Hansson] * Fix Request#host_with_port to use the standard port when Rails is behind a proxy. [Nicholas Seckar] @@ -3118,7 +3118,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Misc doc fixes (typos/grammar/etc). #2445. [coffee2code] -* Speed improvement for session_options. #2287. [skaes@web.de] +* Speed improvement for session_options. #2287. [Stefan Kaes] * Make cacheing binary files friendly with Windows. #1975. [Rich Olson] @@ -3130,9 +3130,9 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Make assert_tag :children count appropriately. Closes #2181. [jamie@bravenet.com] -* Forced newer versions of RedCloth to use hard breaks [DHH] +* Forced newer versions of RedCloth to use hard breaks [David Heinemeier Hansson] -* Added new scriptaculous options for auto_complete_field #2343 [m.stienstra@fngtps.com] +* Added new scriptaculous options for auto_complete_field #2343 [Manfred Stienstra] * Don't prepend the asset host if the string is already a fully-qualified URL @@ -3146,13 +3146,13 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Keep flash after components are rendered. #2291 [Rick Olson, Scott] -* Shorten IE file upload path to filename only to match other browsers. #1507 [court3nay@gmail.com] +* Shorten IE file upload path to filename only to match other browsers. #1507 [court3nay] * Fix open/save dialog in IE not opening files send with send_file/send_data, #2279 [Thomas Fuchs] -* Fixed that auto_discovery_link_tag couldn't take a string as the URL [DHH] +* Fixed that auto_discovery_link_tag couldn't take a string as the URL [David Heinemeier Hansson] -* Fixed problem with send_file and WEBrick using stdout #1812 [DHH] +* Fixed problem with send_file and WEBrick using stdout #1812 [David Heinemeier Hansson] * Optimized tag_options to not sort keys, which is no longer necessary when assert_dom_equal and friend is available #1995 [skae] @@ -3170,7 +3170,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Speed up cookie use by decreasing string copying #2194 [skae] -* Fixed access to "Host" header with requests made by crappy old HTTP/1.0 clients #2124 [Marcel Molina] +* Fixed access to "Host" header with requests made by crappy old HTTP/1.0 clients #2124 [Marcel Molina Jr.] * Added easy assignment of fragment cache store through use of symbols for included stores (old way still works too) @@ -3220,7 +3220,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Avoid extending view instance with helper modules each request. Closes #1979 -* Performance improvements to CGI methods. Closes #1980 [Skaes] +* Performance improvements to CGI methods. Closes #1980 [Stefan Kaes] * Added :post option to UrlHelper#link_to that makes it possible to do POST requests through normal ahref links using Javascript @@ -3237,13 +3237,13 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Drop trailing \000 if present on RAW_POST_DATA (works around bug in Safari Ajax implementation) #918 -* Fix observe_field to fall back to event-based observation if frequency <= 0 #1916 [michael@schubert.cx] +* Fix observe_field to fall back to event-based observation if frequency <= 0 #1916 [Michael Schubert] * Allow use of the :with option for submit_to_remote #1936 [jon@instance-design.co.uk] -* AbstractRequest#domain returns nil when host is an ip address #2012 [kevin.clark@gmail.com] +* AbstractRequest#domain returns nil when host is an ip address #2012 [Kevin Clark] -* ActionController documentation update #2051 [fbeausoleil@ftml.net] +* ActionController documentation update #2051 [François Beausoleil] * Yield @content_for_ variables to templates #2058 [Sam Stephenson] @@ -3259,7 +3259,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fix Routing to handle :some_param => nil better. [Nicholas Seckar, Luminas] -* Add support for :include with pagination (subject to existing constraints for :include with :limit and :offset) #1478 [michael@schubert.cx] +* Add support for :include with pagination (subject to existing constraints for :include with :limit and :offset) #1478 [Michael Schubert] * Prevent the benchmark module from blowing up if a non-HTTP/1.1 request is processed @@ -3287,7 +3287,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added support for per-action session management #1763 -* Improved rendering speed on complicated templates by up to 100% (the more complex the templates, the higher the speedup) #1234 [Stephan Kaes]. This did necessasitate a change to the internals of ActionView#render_template that now has four parameters. Developers of custom view handlers (like Amrita) need to update for that. +* Improved rendering speed on complicated templates by up to 100% (the more complex the templates, the higher the speedup) #1234 [Stefan Kaes]. This did necessasitate a change to the internals of ActionView#render_template that now has four parameters. Developers of custom view handlers (like Amrita) need to update for that. * Added options hash as third argument to FormHelper#input, so you can do input('person', 'zip', :size=>10) #1719 [jeremye@bsa.ca.gov] @@ -3314,7 +3314,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fixed that Action View should always use the included Builder, never attempt to require the gem, to ensure compatibility -* Added that nil options are not included in tags, so tag("p", :ignore => nil) now returns <p /> not <p ignore="" /> but that tag("p", :ignore => "") still includes it #1465 [michael@schuerig.de] +* Added that nil options are not included in tags, so tag("p", :ignore => nil) now returns <p /> not <p ignore="" /> but that tag("p", :ignore => "") still includes it #1465 [Michael Schuerig] * Fixed that UrlHelper#link_to_unless/link_to_if used html_escape on the name if no link was to be applied. This is unnecessary and breaks its use with images #1649 [joergd@pobox.com] @@ -3352,9 +3352,9 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added javascript_include_tag :defaults shortcut that'll include all the default javascripts included with Action Pack (prototype, effects, controls, dragdrop) -* Cache several controller variables that are expensive to calculate #1229 [skaes@web.de] +* Cache several controller variables that are expensive to calculate #1229 [Stefan Kaes] -* The session class backing CGI::Session::ActiveRecordStore may be replaced with any class that duck-types with a subset of Active Record. See docs for details #1238 [skaes@web.de] +* The session class backing CGI::Session::ActiveRecordStore may be replaced with any class that duck-types with a subset of Active Record. See docs for details #1238 [Stefan Kaes] * Fixed that hashes was not working properly when passed by GET to lighttpd #849 [Nicholas Seckar] @@ -3371,7 +3371,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car <p>Product 2</p> <% end %> -* Added :field_name option to DateHelper#select_(year|month|day) to deviate from the year/month/day defaults #1266 [Marcel Molina] +* Added :field_name option to DateHelper#select_(year|month|day) to deviate from the year/month/day defaults #1266 [Marcel Molina Jr.] * Added JavascriptHelper#draggable_element and JavascriptHelper#drop_receiving_element to facilitate easy dragging and dropping through the script.aculo.us libraries #1578 [Thomas Fuchs] @@ -3415,7 +3415,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added named routes (NEEDS BETTER DESCRIPTION) #1434 [Nicholas Seckar] -* Improved AbstractRequest documentation #1483 [court3nay@gmail.com] +* Improved AbstractRequest documentation #1483 [court3nay] * Added ActionController::Base.allow_concurrency to control whether the application is thread-safe, so multi-threaded servers like WEBrick knows whether to apply a mutex around the performance of each action. Turned off by default. EXPERIMENTAL FEATURE. @@ -3427,7 +3427,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added :xhr => true/false option to verify so you can ensure that a request is coming from an Ajax call or not #1464 [Thomas Fuchs] -* Added tag_options as a third parameter to AssetHelper#auto_discovery_link_tag to control options like the title of the link #1430 [kevin.clark@gmail.com] +* Added tag_options as a third parameter to AssetHelper#auto_discovery_link_tag to control options like the title of the link #1430 [Kevin Clark] * Added option to pass in parameters to CaptureHelper#capture, so you can create more advanced view helper methods #1466 [duane.johnson@gmail.com]. Example: @@ -3453,11 +3453,11 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added button_to as a form-based solution to deal with harmful actions that should be hidden behind POSTs. This makes it just as easy as link_to to create a safe trigger for actions like destroy, although it's limited by being a block element, the fixed look, and a no-no inside other forms. #1371 [tom@moertel.com] -* Fixed image_tag so an exception is not thrown just because the image is missing and alt value can't be generated #1395 [Marcel] +* Fixed image_tag so an exception is not thrown just because the image is missing and alt value can't be generated #1395 [Marcel Molina Jr.] * Added a third parameter to TextHelper#auto_link called href_options for specifying additional tag options on the links generated #1401 [tyler.kovacs@gmail.com]. Example: auto_link(text, :all, { :target => "_blank" }) to have all the generated links open in a new window. -* Fixed TextHelper#highlight to return the text, not nil, if the phrase is blank #1409 [patrick@lenz.sh] +* Fixed TextHelper#highlight to return the text, not nil, if the phrase is blank #1409 [Patrick Lenz] * Fixed TagHelper such that :name and 'name' keys in the options doesn't result in two attributes #1455 [take_tk] @@ -3471,7 +3471,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Allow distance_of_time_in_words to work with any value that responds to #to_time (like dates) #969 -* Support :render option for :verify #1440 [TobiasLuetke] +* Support :render option for :verify #1440 [Tobias Lütke] * Updated vendor copy of html-scanner lib to 0.5.2, for bug fixes and optimizations. The :content option may be used as expected--to find a tag whose textual content is a particular value--in assert_tag, now. @@ -3585,7 +3585,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fixed action/fragment caching using the filestore when a directory and a file wanted to use the same name. Now there's a .cache prefix that sidesteps the conflict #1188 [imbcmdth@hotmail.com] -* Fixed missing id uniqueness in FormTag#radio_button #1207 [Jarkko] +* Fixed missing id uniqueness in FormTag#radio_button #1207 [Jarkko Laine] * Fixed assert_redirected_to to work with :only_path => false #1204 [Alisdair McDiarmid] @@ -3690,7 +3690,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added support for web servers that use PATH_INFO instead of REQUEST_URI like IIS #1014 [BradG/Nicholas Seckar] -* Added graceful handling of PUT, DELETE, and OPTIONS requests for a complete coverage of REST functionality #1136 [joshknowles@gmail.com] +* Added graceful handling of PUT, DELETE, and OPTIONS requests for a complete coverage of REST functionality #1136 [Josh Knowles] * Fixed that you can now pass an alternative :href option to link_to_function/remote in order to point to somewhere other than # if the javascript fails or is turned off. You can do the same with form_remote_tag by passing in :action. #1113 [Sam Stephenson] @@ -3714,7 +3714,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fixed pagination to work with joins #1034 [scott@sigkill.org] -* Fixed that *rest parameter in map.connect couldn't accept an empty list #1037 [Dee.Zsombor@gmail.com] +* Fixed that *rest parameter in map.connect couldn't accept an empty list #1037 [Dee Zsombor] * Added :confirm option to link_to_remote just like link_to has #1082 [yrashk@fp.org.ua] @@ -3734,7 +3734,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added JavascriptHelper#periodically_call_remote in order to create areas of a page that update automatically at a set interval #945 [Jon Tirsen] -* Fixed Cache#expire_matched_fragments that couldn't recognize the difference between string and url_for options #1030 [skaes@web.de] +* Fixed Cache#expire_matched_fragments that couldn't recognize the difference between string and url_for options #1030 [Stefan Kaes] * Added simulation of @request.request_uri in functional tests #1038 [Jamis Buck] @@ -3777,7 +3777,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added :position option to link_to_remote/form_remote_tag that can be either :before, :top, :bottom, or :after and specifies where the return from the method should be inserted #952 [Matthew McCray/Sam Stephenson] -* Added Effect.Highlight to prototype.js to do Yellow Fade Technique (of 37signals' fame) on any container #952 [Sam Stephenson/courtenay] +* Added Effect.Highlight to prototype.js to do Yellow Fade Technique (of 37signals' fame) on any container #952 [Sam Stephenson/court3nay] * Added include_seconds option as the third parameter to distance_of_time_in_words which will render "less than a minute" in higher resolution ("less than 10 seconds" etc) #944 [thomas@fesch.at] @@ -3791,9 +3791,9 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added trailing_slash option to url_for, so you can generate urls ending in a slash. Note that is currently not recommended unless you need it for special reasons since it breaks caching #937 [stian@grytoyr.net] -* Added expire_matched_fragments(regular_expression) to clear out a lot of fragment caches at once #927 [technoweenie@gmail.com] +* Added expire_matched_fragments(regular_expression) to clear out a lot of fragment caches at once #927 [Rick Olson] -* Fixed the problems with : and ? in file names for fragment caches on Windows #927 [technoweenie@gmail.com] +* Fixed the problems with : and ? in file names for fragment caches on Windows #927 [Rick Olson] * Added TextHelper#human_size for formatting file sizes, like human_size(1234567) => 1.2 MB #943 [thomas@fesch.at] @@ -3810,7 +3810,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added pagination support through both a controller and helper add-on #817 [Sam Stephenson] -* Fixed routing and helpers to make Rails work on non-vhost setups #826 [Nicholas Seckar/Tobias Luetke] +* Fixed routing and helpers to make Rails work on non-vhost setups #826 [Nicholas Seckar/Tobias Lütke] * Added a much improved Flash module that allows for finer-grained control on expiration and allows you to flash the current action #839 [Caio Chassot]. Example of flash.now: @@ -3869,7 +3869,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fixed options_for_select on selected line issue #624 [Florian Weber] -* Added CaptureHelper with CaptureHelper#capture and CaptureHelper#content_for. See documentation in helper #837 [Tobias Luetke] +* Added CaptureHelper with CaptureHelper#capture and CaptureHelper#content_for. See documentation in helper #837 [Tobias Lütke] * Fixed :anchor use in url_for #821 [Nicholas Seckar] @@ -4005,7 +4005,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fixed the ordering of attributes in the xml-decleration of Builder #540 [woeye] -* Added @request.raw_post as a convenience access to @request.env['RAW_POST_DATA'] #534 [Tobias Luetke] +* Added @request.raw_post as a convenience access to @request.env['RAW_POST_DATA'] #534 [Tobias Lütke] * Added support for automatic id-based indexing for lists of items #532 [dblack]. Example: @@ -4095,13 +4095,13 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fixed url rewriter confusion when the controller or action name was a substring of the controller_prefix or action_prefix -* Added conditional layouts like <tt>layout "weblog_standard", :except => :rss</tt> #452 [Marcel Molina] +* Added conditional layouts like <tt>layout "weblog_standard", :except => :rss</tt> #452 [Marcel Molina Jr.] * Fixed that MemCacheStore wasn't included by default and added default MemCache object pointing to localhost #447 [Lucas Carlson] -* Added fourth argument to render_collection_of_partials that allows you to specify local_assigns -- just like render_partial #432 [zenspider] +* Added fourth argument to render_collection_of_partials that allows you to specify local_assigns -- just like render_partial #432 [Ryan Davis] -* Fixed that host would choke when cgi.host returned nil #432 [Tobias Luetke] +* Fixed that host would choke when cgi.host returned nil #432 [Tobias Lütke] * Added that form helpers now take an index option #448 [Tim Bates] @@ -4133,7 +4133,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car redirect_to(:controller => "account", :action => "login") unless @session[:authenticated] end -* Added conditional filters #431 [Marcel]. Example: +* Added conditional filters #431 [Marcel Molina Jr.]. Example: class JournalController < ActionController::Base # only require authentication if the current action is edit or delete @@ -4167,7 +4167,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added second boolean parameter to Base.redirect_to_url and Response#redirect to control whether the redirect is permanent or not (301 vs 302) #375 [Hodel] -* Fixed redirects when the controller and action is named the same. Still haven't fixed same controller, module, and action, though #201 [Josh] +* Fixed redirects when the controller and action is named the same. Still haven't fixed same controller, module, and action, though #201 [Josh Peek] * Fixed problems with running multiple functional tests in Rails under 1.8.2 by including hack for test/unit weirdness @@ -4177,7 +4177,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car *1.1.0* * Added search through session to clear out association caches at the end of each request. This makes it possible to place Active Record objects - in the session without worrying about stale data in the associations (the main object is still subject to caching, naturally) #347 [Tobias Luetke] + in the session without worrying about stale data in the associations (the main object is still subject to caching, naturally) #347 [Tobias Lütke] * Added more informative exception when using helper :some_helper and the helper requires another file that fails, you'll get an error message tells you what file actually failed to load, rather than falling back on assuming it was the helper file itself #346 [dblack] @@ -4197,7 +4197,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fixed that textilize and markdown would instantiate their engines even on empty strings. This also fixes #333 [Ulysses] -* Fixed UrlHelper#link_to_unless so it doesn't care if the id is a string or fixnum [zenspider] +* Fixed UrlHelper#link_to_unless so it doesn't care if the id is a string or fixnum [Ryan Davis] *1.0.1* @@ -4214,7 +4214,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fixed DateHelper#date_select so that you can pass include_blank as an option even if you don't use start_year and end_year #59 [what-a-day] * Added that controllers will now search for a layout in $template_root/layouts/$controller_name.r(html|xml), so PostsController will look - for layouts/posts.rhtml or layouts/posts.rxml and automatically configure this layout if found #307 [Marcel] + for layouts/posts.rhtml or layouts/posts.rxml and automatically configure this layout if found #307 [Marcel Molina Jr.] * Added FormHelper#radio_button to work with radio buttons like its already possible with check boxes [Michael Koziarski] @@ -4259,11 +4259,11 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added that render_partial will always by default include a counter with value 1 unless there is a counter passed in via the local_assigns hash that overrides it. As a result, render_collection_of_partials can still be written in terms of render_partial and partials that make use of a counter can be called without problems from both render_collection_of_partials as well as - render_partial #295 [marcel] + render_partial #295 [Marcel Molina Jr.] * Fixed CgiRequest#out to fall back to #write if $stdout doesn't have #syswrite [Jeremy Kemper] -* Fixed all helpers so that they use XHTML compliant double quotes for values instead of single quotes [htonl/bitsweat] +* Fixed all helpers so that they use XHTML compliant double quotes for values instead of single quotes [htonl/Jeremy Kemper] * Added link_to_image(src, options = {}, html_options = {}). Documentation: @@ -4283,11 +4283,11 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fixed to_input_field_tag so it no longer explicitly uses InstanceTag.value if value was specified in the options hash [evl] -* Added the possibility of having validate be protected for assert_(in)valid_column #263 [Tobias Luetke] +* Added the possibility of having validate be protected for assert_(in)valid_column #263 [Tobias Lütke] * Added that ActiveRecordHelper#form now calls url_for on the :action option. -* Added all the HTTP methods as alternatives to the generic "process" for functional testing #276 [Tobias Luetke]. Examples: +* Added all the HTTP methods as alternatives to the generic "process" for functional testing #276 [Tobias Lütke]. Examples: # Calls Controller#miletone with a GET request process :milestone @@ -4444,9 +4444,9 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added a hidden field to checkboxes generated with FormHelper#check_box that will make sure that the unchecked value (usually 0) is sent even if the checkbox is not checked. This relieves the controller from doing custom checking if the checkbox wasn't - checked. BEWARE: This might conflict with your run-on-the-mill work-around code. [Tobias Luetke] + checked. BEWARE: This might conflict with your run-on-the-mill work-around code. [Tobias Lütke] -* Fixed error_message_on to just use the first if more than one error had been added [marcel] +* Fixed error_message_on to just use the first if more than one error had been added [Marcel Molina Jr.] * Fixed that URL rewriting with /controller/ was working but /controller was not and that you couldn't use :id on index [geech] @@ -4566,7 +4566,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added caching for compiled ERb templates. On Basecamp, it gave between 8.5% and 71% increase in performance [Andreas Schwarz]. -* Added implicit counter variable to render_collection_of_partials [Marcel]. From the docs: +* Added implicit counter variable to render_collection_of_partials [Marcel Molina Jr.]. From the docs: <%= render_collection_of_partials "ad", @advertisements %> diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index c170e4dd2a..eaf7779f1e 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -56,6 +56,7 @@ module ActionController autoload :Integration, 'action_controller/integration' autoload :IntegrationTest, 'action_controller/integration' autoload :Layout, 'action_controller/layout' + autoload :Lock, 'action_controller/lock' autoload :MiddlewareStack, 'action_controller/middleware_stack' autoload :MimeResponds, 'action_controller/mime_responds' autoload :PolymorphicRoutes, 'action_controller/polymorphic_routes' diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 0b32da55d5..454ef4ffac 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1160,13 +1160,8 @@ module ActionController #:nodoc: def reset_session #:doc: request.reset_session @_session = request.session - #http://rails.lighthouseapp.com/projects/8994/tickets/1558-memory-problem-on-reset_session-in-around_filter#ticket-1558-1 - #MRI appears to have a GC related memory leak to do with the finalizer that is defined on CGI::Session - ObjectSpace.undefine_finalizer(@_session) - response.session = @_session end - private def render_for_file(template_path, status = nil, layout = nil, locals = {}) #:nodoc: logger.info("Rendering #{template_path}" + (status ? " (#{status})" : '')) if logger diff --git a/actionpack/lib/action_controller/cookies.rb b/actionpack/lib/action_controller/cookies.rb index 0428f2a23d..0e058085ec 100644 --- a/actionpack/lib/action_controller/cookies.rb +++ b/actionpack/lib/action_controller/cookies.rb @@ -67,6 +67,8 @@ module ActionController #:nodoc: cookie = @cookies[name.to_s] if cookie && cookie.respond_to?(:value) cookie.size > 1 ? cookie.value : cookie.value[0] + else + cookie end end diff --git a/actionpack/lib/action_controller/dispatcher.rb b/actionpack/lib/action_controller/dispatcher.rb index c9a9264b6d..11c4f057d8 100644 --- a/actionpack/lib/action_controller/dispatcher.rb +++ b/actionpack/lib/action_controller/dispatcher.rb @@ -2,8 +2,6 @@ module ActionController # Dispatches requests to the appropriate controller and takes care of # reloading the app after each request when Dependencies.load? is true. class Dispatcher - @@guard = Mutex.new - class << self def define_dispatcher_callbacks(cache_classes) unless cache_classes @@ -46,40 +44,49 @@ module ActionController cattr_accessor :middleware self.middleware = MiddlewareStack.new do |middleware| + middleware.use "ActionController::Lock", :if => lambda { + !ActionController::Base.allow_concurrency + } middleware.use "ActionController::Failsafe" - middleware.use "ActionController::SessionManagement::Middleware" + + ["ActionController::Session::CookieStore", + "ActionController::Session::MemCacheStore", + "ActiveRecord::SessionStore"].each do |store| + middleware.use(store, ActionController::Base.session_options, + :if => lambda { + if session_store = ActionController::Base.session_store + session_store.name == store + end + } + ) + end end include ActiveSupport::Callbacks define_callbacks :prepare_dispatch, :before_dispatch, :after_dispatch - # DEPRECATE: Remove arguments + # DEPRECATE: Remove arguments, since they are only used by CGI def initialize(output = $stdout, request = nil, response = nil) - @output, @request, @response = output, request, response + @output = output @app = @@middleware.build(lambda { |env| self.dup._call(env) }) end - def dispatch_unlocked + def dispatch begin run_callbacks :before_dispatch - handle_request + controller = Routing::Routes.recognize(@request) + controller.process(@request, @response).to_a rescue Exception => exception - failsafe_rescue exception + if controller ||= (::ApplicationController rescue Base) + controller.process_with_exception(@request, @response, exception).to_a + else + raise exception + end ensure run_callbacks :after_dispatch, :enumerator => :reverse_each end end - def dispatch - if ActionController::Base.allow_concurrency - dispatch_unlocked - else - @@guard.synchronize do - dispatch_unlocked - end - end - end - # DEPRECATE: Remove CGI support def dispatch_cgi(cgi, session_options) CGIHandler.dispatch_cgi(self, cgi, @output) @@ -118,22 +125,8 @@ module ActionController def checkin_connections # Don't return connection (and peform implicit rollback) if this request is a part of integration test # TODO: This callback should have direct access to env - return if @request.key?("action_controller.test") + return if @request.key?("rack.test") ActiveRecord::Base.clear_active_connections! end - - protected - def handle_request - @controller = Routing::Routes.recognize(@request) - @controller.process(@request, @response).out - end - - def failsafe_rescue(exception) - if @controller ||= (::ApplicationController rescue Base) - @controller.process_with_exception(@request, @response, exception).out - else - raise exception - end - end end end diff --git a/actionpack/lib/action_controller/failsafe.rb b/actionpack/lib/action_controller/failsafe.rb index b1e9957b49..567581142c 100644 --- a/actionpack/lib/action_controller/failsafe.rb +++ b/actionpack/lib/action_controller/failsafe.rb @@ -11,7 +11,7 @@ module ActionController @app.call(env) rescue Exception => exception # Reraise exception in test environment - if env["action_controller.test"] + if env["rack.test"] raise exception else failsafe_response(exception) diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb index 1b0543033b..7590d5d710 100644 --- a/actionpack/lib/action_controller/integration.rb +++ b/actionpack/lib/action_controller/integration.rb @@ -276,6 +276,7 @@ module ActionController "SCRIPT_NAME" => "", "REQUEST_URI" => path, + "PATH_INFO" => path, "HTTP_HOST" => host, "REMOTE_ADDR" => remote_addr, "CONTENT_TYPE" => "application/x-www-form-urlencoded", @@ -290,7 +291,7 @@ module ActionController "rack.multiprocess" => true, "rack.run_once" => false, - "action_controller.test" => true + "rack.test" => true ) (headers || {}).each do |key, value| @@ -310,16 +311,6 @@ module ActionController status, headers, body = app.call(env) @request_count += 1 - if @controller = ActionController::Base.last_instantiation - @request = @controller.request - @response = @controller.response - - # Decorate the response with the standard behavior of the - # TestResponse so that things like assert_response can be - # used in integration tests. - @response.extend(TestResponseBehavior) - end - @html_document = nil @status = status.to_i @@ -335,6 +326,22 @@ module ActionController @body = "" body.each { |part| @body << part } + if @controller = ActionController::Base.last_instantiation + @request = @controller.request + @response = @controller.response + else + # Decorate responses from Rack Middleware and Rails Metal + # as an AbstractResponse for the purposes of integration testing + @response = AbstractResponse.new + @response.headers = @headers.merge('Status' => status.to_s) + @response.body = @body + end + + # Decorate the response with the standard behavior of the + # TestResponse so that things like assert_response can be + # used in integration tests. + @response.extend(TestResponseBehavior) + return @status rescue MultiPartNeededException boundary = "----------XnJLe9ZIbbGUYtzPQJ16u1" diff --git a/actionpack/lib/action_controller/lock.rb b/actionpack/lib/action_controller/lock.rb new file mode 100644 index 0000000000..c50762216e --- /dev/null +++ b/actionpack/lib/action_controller/lock.rb @@ -0,0 +1,16 @@ +module ActionController + class Lock + FLAG = 'rack.multithread'.freeze + + def initialize(app, lock = Mutex.new) + @app, @lock = app, lock + end + + def call(env) + old, env[FLAG] = env[FLAG], false + @lock.synchronize { @app.call(env) } + ensure + env[FLAG] = old + end + end +end diff --git a/actionpack/lib/action_controller/middleware_stack.rb b/actionpack/lib/action_controller/middleware_stack.rb index a6597a6fec..74f28565c0 100644 --- a/actionpack/lib/action_controller/middleware_stack.rb +++ b/actionpack/lib/action_controller/middleware_stack.rb @@ -1,19 +1,39 @@ module ActionController class MiddlewareStack < Array class Middleware - attr_reader :klass, :args, :block + attr_reader :args, :block def initialize(klass, *args, &block) - if klass.is_a?(Class) - @klass = klass + @klass = klass + + options = args.extract_options! + if options.has_key?(:if) + @conditional = options.delete(:if) else - @klass = klass.to_s.constantize + @conditional = true end + args << options unless options.empty? @args = args @block = block end + def klass + if @klass.is_a?(Class) + @klass + else + @klass.to_s.constantize + end + end + + def active? + if @conditional.respond_to?(:call) + @conditional.call + else + @conditional + end + end + def ==(middleware) case middleware when Middleware @@ -50,8 +70,12 @@ module ActionController push(middleware) end + def active + find_all { |middleware| middleware.active? } + end + def build(app) - reverse.inject(app) { |a, e| e.build(a) } + active.reverse.inject(app) { |a, e| e.build(a) } end end end diff --git a/actionpack/lib/action_controller/rack_process.rb b/actionpack/lib/action_controller/rack_process.rb index e783839f34..8483f8e289 100644 --- a/actionpack/lib/action_controller/rack_process.rb +++ b/actionpack/lib/action_controller/rack_process.rb @@ -83,11 +83,7 @@ module ActionController #:nodoc: @status || super end - def out(&block) - # Nasty hack because CGI sessions are closed after the normal - # prepare! statement - set_cookies! - + def to_a(&block) @block = block @status = headers.delete("Status") if [204, 304].include?(status.to_i) @@ -97,7 +93,6 @@ module ActionController #:nodoc: [status, headers.to_hash, self] end end - alias to_a out def each(&callback) if @body.respond_to?(:call) @@ -132,7 +127,7 @@ module ActionController #:nodoc: convert_language! convert_expires! set_status! - # set_cookies! + set_cookies! end private diff --git a/actionpack/lib/action_controller/rescue.rb b/actionpack/lib/action_controller/rescue.rb index 24ee160ee8..b8b0175b5f 100644 --- a/actionpack/lib/action_controller/rescue.rb +++ b/actionpack/lib/action_controller/rescue.rb @@ -104,7 +104,7 @@ module ActionController #:nodoc: status = interpret_status(status_code) path = "#{Rails.public_path}/#{status[0,3]}.html" if File.exist?(path) - render :file => path, :status => status + render :file => path, :status => status, :content_type => Mime::HTML else head status end diff --git a/actionpack/lib/action_controller/routing/recognition_optimisation.rb b/actionpack/lib/action_controller/routing/recognition_optimisation.rb index 3b98b16683..ebc553512f 100644 --- a/actionpack/lib/action_controller/routing/recognition_optimisation.rb +++ b/actionpack/lib/action_controller/routing/recognition_optimisation.rb @@ -56,7 +56,7 @@ module ActionController result = recognize_optimized(path, environment) and return result # Route was not recognized. Try to find out why (maybe wrong verb). - allows = HTTP_METHODS.select { |verb| routes.find { |r| r.recognize(path, :method => verb) } } + allows = HTTP_METHODS.select { |verb| routes.find { |r| r.recognize(path, environment.merge(:method => verb)) } } if environment[:method] && !HTTP_METHODS.include?(environment[:method]) raise NotImplemented.new(*allows) diff --git a/actionpack/lib/action_controller/session/abstract_store.rb b/actionpack/lib/action_controller/session/abstract_store.rb index c6dd865fad..d4b185aaa2 100644 --- a/actionpack/lib/action_controller/session/abstract_store.rb +++ b/actionpack/lib/action_controller/session/abstract_store.rb @@ -11,6 +11,7 @@ module ActionController class SessionHash < Hash def initialize(by, env) + super() @by = by @env = env @loaded = false @@ -21,6 +22,13 @@ module ActionController @id end + def session_id + ActiveSupport::Deprecation.warn( + "ActionController::Session::AbstractStore::SessionHash#session_id" + + "has been deprecated.Please use #id instead.", caller) + id + end + def [](key) load! unless @loaded super @@ -37,6 +45,13 @@ module ActionController h end + def data + ActiveSupport::Deprecation.warn( + "ActionController::Session::AbstractStore::SessionHash#data" + + "has been deprecated.Please use #to_hash instead.", caller) + to_hash + end + private def load! @id, session = @by.send(:load_session, @env) @@ -46,7 +61,7 @@ module ActionController end DEFAULT_OPTIONS = { - :key => 'rack.session', + :key => '_session_id', :path => '/', :domain => nil, :expire_after => nil, @@ -56,6 +71,18 @@ module ActionController } def initialize(app, options = {}) + # Process legacy CGI options + options = options.symbolize_keys + if options.has_key?(:session_path) + options[:path] = options.delete(:session_path) + end + if options.has_key?(:session_key) + options[:key] = options.delete(:session_key) + end + if options.has_key?(:session_http_only) + options[:httponly] = options.delete(:session_http_only) + end + @app = app @default_options = DEFAULT_OPTIONS.merge(options) @key = @default_options[:key] diff --git a/actionpack/lib/action_controller/session/cookie_store.rb b/actionpack/lib/action_controller/session/cookie_store.rb index f4089bfa8b..ba63f8521f 100644 --- a/actionpack/lib/action_controller/session/cookie_store.rb +++ b/actionpack/lib/action_controller/session/cookie_store.rb @@ -41,9 +41,11 @@ module ActionController SECRET_MIN_LENGTH = 30 # characters DEFAULT_OPTIONS = { - :domain => nil, - :path => "/", - :expire_after => nil + :key => '_session_id', + :domain => nil, + :path => "/", + :expire_after => nil, + :httponly => false }.freeze ENV_SESSION_KEY = "rack.session".freeze @@ -56,6 +58,18 @@ module ActionController def initialize(app, options = {}) options = options.dup + # Process legacy CGI options + options = options.symbolize_keys + if options.has_key?(:session_path) + options[:path] = options.delete(:session_path) + end + if options.has_key?(:session_key) + options[:key] = options.delete(:session_key) + end + if options.has_key?(:session_http_only) + options[:httponly] = options.delete(:session_http_only) + end + @app = app # The session_key option is required. @@ -74,21 +88,12 @@ module ActionController freeze end - class SessionHash < AbstractStore::SessionHash - private - def load! - session = @by.send(:load_session, @env) - replace(session) - @loaded = true - end - end - def call(env) - session_data = SessionHash.new(self, env) + session_data = AbstractStore::SessionHash.new(self, env) original_value = session_data.dup env[ENV_SESSION_KEY] = session_data - env[ENV_SESSION_OPTIONS_KEY] = @default_options.dup + env[ENV_SESSION_OPTIONS_KEY] = @default_options status, headers, body = @app.call(env) @@ -142,17 +147,18 @@ module ActionController def load_session(env) request = Rack::Request.new(env) session_data = request.cookies[@key] - unmarshal(session_data) || {} + data = unmarshal(session_data) || persistent_session_id!({}) + [data[:session_id], data] end # Marshal a session hash into safe cookie data. Include an integrity hash. def marshal(session) - @verifier.generate(session) + @verifier.generate( persistent_session_id!(session)) end # Unmarshal cookie data to a hash and verify its integrity. def unmarshal(cookie) - @verifier.verify(cookie) if cookie + persistent_session_id!(@verifier.verify(cookie)) if cookie rescue ActiveSupport::MessageVerifier::InvalidSignature nil end @@ -195,6 +201,26 @@ module ActionController key = secret.respond_to?(:call) ? secret.call : secret ActiveSupport::MessageVerifier.new(key, digest) end + + def generate_sid + ActiveSupport::SecureRandom.hex(16) + end + + def persistent_session_id!(data) + (data ||= {}).merge!(inject_persistent_session_id(data)) + end + + def inject_persistent_session_id(data) + requires_session_id?(data) ? { :session_id => generate_sid } : {} + end + + def requires_session_id?(data) + if data + data.respond_to?(:key?) && !data.key?(:session_id) + else + true + end + end end end end diff --git a/actionpack/lib/action_controller/session_management.rb b/actionpack/lib/action_controller/session_management.rb index a9989d8198..f06a0da75c 100644 --- a/actionpack/lib/action_controller/session_management.rb +++ b/actionpack/lib/action_controller/session_management.rb @@ -6,35 +6,6 @@ module ActionController #:nodoc: end end - class Middleware - DEFAULT_OPTIONS = { - :path => "/", - :key => "_session_id", - :httponly => true, - }.freeze - - def self.new(app) - cgi_options = ActionController::Base.session_options - options = cgi_options.symbolize_keys - options = DEFAULT_OPTIONS.merge(options) - if options.has_key?(:session_path) - options[:path] = options.delete(:session_path) - end - if options.has_key?(:session_key) - options[:key] = options.delete(:session_key) - end - if options.has_key?(:session_http_only) - options[:httponly] = options.delete(:session_http_only) - end - - if store = ActionController::Base.session_store - store.new(app, options) - else # Sessions disabled - lambda { |env| app.call(env) } - end - end - end - module ClassMethods # Set the session store to be used for keeping the session data between requests. # By default, sessions are stored in browser cookies (<tt>:cookie_store</tt>), diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index 8f4ca433c0..93748638c3 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -98,6 +98,10 @@ module ActionView #:nodoc: end private + def valid_extension?(extension) + Template.template_handler_extensions.include?(extension) + end + def find_full_path(path, load_paths) load_paths = Array(load_paths) + [nil] load_paths.each do |load_path| @@ -111,11 +115,11 @@ module ActionView #:nodoc: # [base_path, name, format, extension] def split(file) if m = file.match(/^(.*\/)?([^\.]+)\.?(\w+)?\.?(\w+)?\.?(\w+)?$/) - if Template.valid_extension?(m[5]) # Multipart formats + if valid_extension?(m[5]) # Multipart formats [m[1], m[2], "#{m[3]}.#{m[4]}", m[5]] - elsif Template.valid_extension?(m[4]) # Single format + elsif valid_extension?(m[4]) # Single format [m[1], m[2], m[3], m[4]] - elsif Template.valid_extension?(m[3]) # No format + elsif valid_extension?(m[3]) # No format [m[1], m[2], nil, m[3]] else # No extension [m[1], m[2], m[3], nil] diff --git a/actionpack/lib/action_view/template_handlers.rb b/actionpack/lib/action_view/template_handlers.rb index c50a51b0d1..d06ddd5fb5 100644 --- a/actionpack/lib/action_view/template_handlers.rb +++ b/actionpack/lib/action_view/template_handlers.rb @@ -28,10 +28,6 @@ module ActionView #:nodoc: @@template_handlers[extension.to_sym] = klass end - def valid_extension?(extension) - template_handler_extensions.include?(extension) || init_path_for_extension(extension) - end - def template_handler_extensions @@template_handlers.keys.map(&:to_s).sort end @@ -42,26 +38,7 @@ module ActionView #:nodoc: end def handler_class_for_extension(extension) - (extension && @@template_handlers[extension.to_sym] || autoload_handler_class(extension)) || - @@default_template_handlers + (extension && @@template_handlers[extension.to_sym]) || @@default_template_handlers end - - private - def autoload_handler_class(extension) - return if Gem.loaded_specs[extension] - return unless init_path = init_path_for_extension(extension) - Gem.activate(extension) - load(init_path) - handler_class_for_extension(extension) - end - - # Returns the path to the rails/init.rb file for the given extension, - # or nil if no gem provides it. - def init_path_for_extension(extension) - return unless spec = Gem.searcher.find(extension.to_s) - returning File.join(spec.full_gem_path, 'rails', 'init.rb') do |path| - return unless File.file?(path) - end - end end end diff --git a/actionpack/test/controller/dispatcher_test.rb b/actionpack/test/controller/dispatcher_test.rb index 30dda87bb4..fd06b4ea99 100644 --- a/actionpack/test/controller/dispatcher_test.rb +++ b/actionpack/test/controller/dispatcher_test.rb @@ -50,7 +50,7 @@ class DispatcherTest < Test::Unit::TestCase end def test_failsafe_response - Dispatcher.any_instance.expects(:dispatch_unlocked).raises('b00m') + Dispatcher.any_instance.expects(:dispatch).raises('b00m') ActionController::Failsafe.any_instance.expects(:log_failsafe_exception) assert_nothing_raised do @@ -96,7 +96,9 @@ class DispatcherTest < Test::Unit::TestCase private def dispatch(cache_classes = true) - Dispatcher.any_instance.stubs(:handle_request).returns([200, {}, 'response']) + controller = mock() + controller.stubs(:process).returns([200, {}, 'response']) + ActionController::Routing::Routes.stubs(:recognize).returns(controller) Dispatcher.define_dispatcher_callbacks(cache_classes) @dispatcher.call({}) end diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index fd985a9a46..c28050fe0d 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -373,4 +373,35 @@ class IntegrationProcessTest < ActionController::IntegrationTest end end +class MetalTest < ActionController::IntegrationTest + class Poller + def self.call(env) + if env["PATH_INFO"] =~ /^\/success/ + [200, {"Content-Type" => "text/plain"}, "Hello World!"] + else + [404, {"Content-Type" => "text/plain"}, ''] + end + end + end + + def setup + @integration_session = ActionController::Integration::Session.new(Poller) + end + + def test_successful_get + get "/success" + assert_response 200 + assert_response :success + assert_response :ok + assert_equal "Hello World!", response.body + end + + def test_failed_get + get "/failure" + assert_response 404 + assert_response :not_found + assert_equal '', response.body + end +end + end diff --git a/actionpack/test/controller/rack_test.rb b/actionpack/test/controller/rack_test.rb index e2ec686c41..3a8a00b7d7 100644 --- a/actionpack/test/controller/rack_test.rb +++ b/actionpack/test/controller/rack_test.rb @@ -236,7 +236,7 @@ class RackResponseTest < BaseRackTest @response.body = "Hello, World!" @response.prepare! - status, headers, body = @response.out + status, headers, body = @response.to_a assert_equal "200 OK", status assert_equal({ "Content-Type" => "text/html; charset=utf-8", @@ -257,7 +257,7 @@ class RackResponseTest < BaseRackTest end @response.prepare! - status, headers, body = @response.out + status, headers, body = @response.to_a assert_equal "200 OK", status assert_equal({"Content-Type" => "text/html; charset=utf-8", "Cache-Control" => "no-cache", "Set-Cookie" => []}, headers) @@ -293,6 +293,6 @@ class RackResponseHeadersTest < BaseRackTest private def response_headers @response.prepare! - @response.out[1] + @response.to_a[1] end end diff --git a/actionpack/test/controller/session/cookie_store_test.rb b/actionpack/test/controller/session/cookie_store_test.rb index 8098059d46..ad8ff09884 100644 --- a/actionpack/test/controller/session/cookie_store_test.rb +++ b/actionpack/test/controller/session/cookie_store_test.rb @@ -9,6 +9,8 @@ class CookieStoreTest < ActionController::IntegrationTest CookieStoreApp = ActionController::Session::CookieStore.new(DispatcherApp, :key => SessionKey, :secret => SessionSecret) + Verifier = ActiveSupport::MessageVerifier.new(SessionSecret, 'SHA1') + SignedBar = "BAh7BjoIZm9vIghiYXI%3D--" + "fef868465920f415f2c0652d6910d3af288a0367" @@ -17,9 +19,13 @@ class CookieStoreTest < ActionController::IntegrationTest head :ok end + def persistent_session_id + render :text => session[:session_id] + end + def set_session_value session[:foo] = "bar" - head :ok + render :text => Marshal.dump(session.to_hash) end def get_session_value @@ -83,7 +89,8 @@ class CookieStoreTest < ActionController::IntegrationTest with_test_route_set do get '/set_session_value' assert_response :success - assert_equal ["_myapp_session=#{SignedBar}; path=/"], + session_payload = Verifier.generate( Marshal.load(response.body) ) + assert_equal ["_myapp_session=#{session_payload}; path=/"], headers['Set-Cookie'] end end @@ -132,6 +139,21 @@ class CookieStoreTest < ActionController::IntegrationTest end end + def test_persistent_session_id + with_test_route_set do + cookies[SessionKey] = SignedBar + get '/persistent_session_id' + assert_response :success + assert_equal response.body.size, 32 + session_id = response.body + get '/persistent_session_id' + assert_equal session_id, response.body + reset! + get '/persistent_session_id' + assert_not_equal session_id, response.body + end + end + private def with_test_route_set with_routing do |set| diff --git a/actionpack/test/controller/session_fixation_test.rb b/actionpack/test/controller/session_fixation_test.rb deleted file mode 100644 index 9e5b45dc3d..0000000000 --- a/actionpack/test/controller/session_fixation_test.rb +++ /dev/null @@ -1,84 +0,0 @@ -# require 'abstract_unit' -# -# class SessionFixationTest < ActionController::IntegrationTest -# class TestController < ActionController::Base -# session :session_key => '_myapp_session_id', -# :secret => CGI::Session.generate_unique_id, -# :except => :default_session_key -# -# session :cookie_only => false, -# :only => :allow_session_fixation -# -# def default_session_key -# render :text => "default_session_key" -# end -# -# def custom_session_key -# render :text => "custom_session_key: #{params[:id]}" -# end -# -# def allow_session_fixation -# render :text => "allow_session_fixation" -# end -# -# def rescue_action(e) raise end -# end -# -# def setup -# @controller = TestController.new -# end -# -# def test_should_be_able_to_make_a_successful_request -# with_test_route_set do -# assert_nothing_raised do -# get '/custom_session_key', :id => "1" -# end -# assert_equal 'custom_session_key: 1', @controller.response.body -# assert_not_nil @controller.session -# end -# end -# -# def test_should_catch_session_fixation_attempt -# with_test_route_set do -# assert_raises(ActionController::RackRequest::SessionFixationAttempt) do -# get '/custom_session_key', :_myapp_session_id => "42" -# end -# assert_nil @controller.session -# end -# end -# -# def test_should_not_catch_session_fixation_attempt_when_cookie_only_setting_is_disabled -# with_test_route_set do -# assert_nothing_raised do -# get '/allow_session_fixation', :_myapp_session_id => "42" -# end -# assert !@controller.response.body.blank? -# assert_not_nil @controller.session -# end -# end -# -# def test_should_catch_session_fixation_attempt_with_default_session_key -# # using the default session_key is not possible with cookie store -# ActionController::Base.session_store = :p_store -# -# with_test_route_set do -# assert_raises ActionController::RackRequest::SessionFixationAttempt do -# get '/default_session_key', :_session_id => "42" -# end -# assert_nil @controller.response -# assert_nil @controller.session -# end -# end -# -# private -# def with_test_route_set -# with_routing do |set| -# set.draw do |map| -# map.with_options :controller => "session_fixation_test/test" do |c| -# c.connect "/:action" -# end -# end -# yield -# end -# end -# end diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 423a0bd0cc..d057ddfcd0 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -2,7 +2,7 @@ * I18n the word separator for error messages. Introduces the activerecord.errors.format.separator translation key. #1294 [Akira Matsuda] -* Add :having as a key to find and the relevant associations. [miloops] +* Add :having as a key to find and the relevant associations. [Emilio Tagua] * Added default_scope to Base #1381 [Paweł Kondzior]. Example: @@ -29,19 +29,19 @@ * Skip collection ids reader optimization if using :finder_sql [Jeremy Kemper] -* Add Model#delete instance method, similar to Model.delete class method. #1086 [Hongli Lai] +* Add Model#delete instance method, similar to Model.delete class method. #1086 [Hongli Lai (Phusion)] * MySQL: cope with quirky default values for not-null text columns. #1043 [Frederick Cheung] * Multiparameter attributes skip time zone conversion for time-only columns [#1030 state:resolved] [Geoff Buesing] -* Base.skip_time_zone_conversion_for_attributes uses class_inheritable_accessor, so that subclasses don't overwrite Base [#346 state:resolved] [miloops] +* Base.skip_time_zone_conversion_for_attributes uses class_inheritable_accessor, so that subclasses don't overwrite Base [#346 state:resolved] [Emilio Tagua] -* Added find_last_by dynamic finder #762 [miloops] +* Added find_last_by dynamic finder #762 [Emilio Tagua] -* Internal API: configurable association options and build_association method for reflections so plugins may extend and override. #985 [Hongli Lai] +* Internal API: configurable association options and build_association method for reflections so plugins may extend and override. #985 [Hongli Lai (Phusion)] -* Changed benchmarks to be reported in milliseconds [DHH] +* Changed benchmarks to be reported in milliseconds [David Heinemeier Hansson] * Connection pooling. #936 [Nick Sieger] @@ -90,7 +90,7 @@ *2.1.0 (May 31st, 2008)* -* Add ActiveRecord::Base.sti_name that checks ActiveRecord::Base#store_full_sti_class? and returns either the full or demodulized name. [rick] +* Add ActiveRecord::Base.sti_name that checks ActiveRecord::Base#store_full_sti_class? and returns either the full or demodulized name. [Rick Olson] * Add first/last methods to associations/named_scope. Resolved #226. [Ryan Bates] @@ -123,27 +123,27 @@ * Fixed that change_column should be able to use :null => true on a field that formerly had false [Nate Wiger] [#26] -* Added that the MySQL adapter should map integer to either smallint, int, or bigint depending on the :limit just like PostgreSQL [DHH] +* Added that the MySQL adapter should map integer to either smallint, int, or bigint depending on the :limit just like PostgreSQL [David Heinemeier Hansson] -* Change validates_uniqueness_of :case_sensitive option default back to true (from [9160]). Love your database columns, don't LOWER them. [rick] +* Change validates_uniqueness_of :case_sensitive option default back to true (from [9160]). Love your database columns, don't LOWER them. [Rick Olson] -* Add support for interleaving migrations by storing which migrations have run in the new schema_migrations table. Closes #11493 [jordi] +* Add support for interleaving migrations by storing which migrations have run in the new schema_migrations table. Closes #11493 [Jordi Bunster] -* ActiveRecord::Base#sum defaults to 0 if no rows are returned. Closes #11550 [kamal] +* ActiveRecord::Base#sum defaults to 0 if no rows are returned. Closes #11550 [Kamal Fariz Mahyuddin] -* Ensure that respond_to? considers dynamic finder methods. Closes #11538. [floehopper] +* Ensure that respond_to? considers dynamic finder methods. Closes #11538. [James Mead] -* Ensure that save on parent object fails for invalid has_one association. Closes #10518. [Pratik] +* Ensure that save on parent object fails for invalid has_one association. Closes #10518. [Pratik Naik] -* Remove duplicate code from associations. [Pratik] +* Remove duplicate code from associations. [Pratik Naik] -* Refactor HasManyThroughAssociation to inherit from HasManyAssociation. Association callbacks and <association>_ids= now work with hm:t. #11516 [rubyruy] +* Refactor HasManyThroughAssociation to inherit from HasManyAssociation. Association callbacks and <association>_ids= now work with hm:t. #11516 [Ruy Asan] -* Ensure HABTM#create and HABTM#build do not load entire association. [Pratik] +* Ensure HABTM#create and HABTM#build do not load entire association. [Pratik Naik] * Improve documentation. [Xavier Noria, Jack Danger Canty, leethal] -* Tweak ActiveRecord::Base#to_json to include a root value in the returned hash: {"post": {"title": ...}} [rick] +* Tweak ActiveRecord::Base#to_json to include a root value in the returned hash: {"post": {"title": ...}} [Rick Olson] Post.find(1).to_json # => {"title": ...} config.active_record.include_root_in_json = true @@ -151,9 +151,9 @@ * Add efficient #include? to AssociationCollection (for has_many/has_many :through/habtm). [stopdropandrew] -* PostgreSQL: create_ and drop_database support. #9042 [ez, pedz, nicksieger] +* PostgreSQL: create_ and drop_database support. #9042 [ez, pedz, Nick Sieger] -* Ensure that validates_uniqueness_of works with with_scope. Closes #9235. [nik.wakelin, cavalle] +* Ensure that validates_uniqueness_of works with with_scope. Closes #9235. [Nik Wakelin, cavalle] * Partial updates include only unsaved attributes. Off by default; set YourClass.partial_updates = true to enable. [Jeremy Kemper] @@ -163,21 +163,21 @@ * Track changes to unsaved attributes. [Jeremy Kemper] -* Switched to UTC-timebased version numbers for migrations and the schema. This will as good as eliminate the problem of multiple migrations getting the same version assigned in different branches. Also added rake db:migrate:up/down to apply individual migrations that may need to be run when you merge branches #11458 [jbarnette] +* Switched to UTC-timebased version numbers for migrations and the schema. This will as good as eliminate the problem of multiple migrations getting the same version assigned in different branches. Also added rake db:migrate:up/down to apply individual migrations that may need to be run when you merge branches #11458 [John Barnette] -* Fixed that has_many :through would ignore the hash conditions #11447 [miloops] +* Fixed that has_many :through would ignore the hash conditions #11447 [Emilio Tagua] * Fix issue where the :uniq option of a has_many :through association is ignored when find(:all) is called. Closes #9407 [cavalle] * Fix duplicate table alias error when including an association with a has_many :through association on the same join table. Closes #7310 [cavalle] -* More efficient association preloading code that compacts a through_records array in a central location. Closes #11427 [danger] +* More efficient association preloading code that compacts a through_records array in a central location. Closes #11427 [Jack Danger Canty] -* Improve documentation. [Radar, Jan De Poorter, chuyeow, xaviershay, danger, miloops, Xavier Noria, Sunny Ripert] +* Improve documentation. [Ryan Bigg, Jan De Poorter, Cheah Chu Yeow, Xavier Shay, Jack Danger Canty, Emilio Tagua, Xavier Noria, Sunny Ripert] -* Fixed that ActiveRecord#Base.find_or_create/initialize would not honor attr_protected/accessible when used with a hash #11422 [miloops] +* Fixed that ActiveRecord#Base.find_or_create/initialize would not honor attr_protected/accessible when used with a hash #11422 [Emilio Tagua] -* Added ActiveRecord#Base.all/first/last as aliases for find(:all/:first/:last) #11413 [nkallen, thechrisoshow] +* Added ActiveRecord#Base.all/first/last as aliases for find(:all/:first/:last) #11413 [nkallen, Chris O'Sullivan] * Merge the has_finder gem, renamed as 'named_scope'. #11404 [nkallen] @@ -193,25 +193,25 @@ See http://pivots.pivotallabs.com/users/nick/blog/articles/284-hasfinder-it-s-now-easier-than-ever-to-create-complex-re-usable-sql-queries -* Add has_one :through support. #4756 [thechrisoshow] +* Add has_one :through support. #4756 [Chris O'Sullivan] -* Migrations: create_table supports primary_key_prefix_type. #10314 [student, thechrisoshow] +* Migrations: create_table supports primary_key_prefix_type. #10314 [student, Chris O'Sullivan] * Added logging for dependency load errors with fixtures #11056 [stuthulhu] * Time zone aware attributes use Time#in_time_zone [Geoff Buesing] -* Fixed that scoped joins would not always be respected #6821 [Theory/Danger] +* Fixed that scoped joins would not always be respected #6821 [Theory/Jack Danger Canty] * Ensure that ActiveRecord::Calculations disambiguates field names with the table name. #11027 [cavalle] * Added add/remove_timestamps to the schema statements for adding the created_at/updated_at columns on existing tables #11129 [jramirez] -* Added ActiveRecord::Base.find(:last) #11338 [miloops] +* Added ActiveRecord::Base.find(:last) #11338 [Emilio Tagua] * test_native_types expects DateTime.local_offset instead of DateTime.now.offset; fixes test breakage due to dst transition [Geoff Buesing] -* Add :readonly option to HasManyThrough associations. #11156 [miloops] +* Add :readonly option to HasManyThrough associations. #11156 [Emilio Tagua] * Improve performance on :include/:conditions/:limit queries by selectively joining in the pre-query. #9560 [dasil003] @@ -231,7 +231,7 @@ * Optimise the BigDecimal conversion code. #11110 [adymo] -* Introduce the :readonly option to all associations. Records from the association cannot be saved. #11084 [miloops] +* Introduce the :readonly option to all associations. Records from the association cannot be saved. #11084 [Emilio Tagua] * Multiparameter attributes for time columns fail over to DateTime when out of range of Time [Geoff Buesing] @@ -239,15 +239,15 @@ * Add timezone-aware attribute readers and writers. #10982 [Geoff Buesing] -* Instantiating time objects in multiparameter attributes uses Time.zone if available. #10982 [rick] +* Instantiating time objects in multiparameter attributes uses Time.zone if available. #10982 [Rick Olson] -* Add note about how ActiveRecord::Observer classes are initialized in a Rails app. #10980 [fxn] +* Add note about how ActiveRecord::Observer classes are initialized in a Rails app. #10980 [Xavier Noria] * MySQL: omit text/blob defaults from the schema instead of using an empty string. #10963 [mdeiters] * belongs_to supports :dependent => :destroy and :delete. #10592 [Jonathan Viney] -* Introduce preload query strategy for eager :includes. #9640 [Frederick Cheung, Aleksey Kondratenko, codafoo] +* Introduce preload query strategy for eager :includes. #9640 [Frederick Cheung, Aliaksey Kandratsenka, codafoo] * Support aggregations in finder conditions. #10572 [Ryan Kinderman] @@ -263,13 +263,13 @@ * update_all ignores scoped :order and :limit, so post.comments.update_all doesn't try to include the comment order in the update statement. #10686 [Brendan Ribera] -* Added ActiveRecord::Base.cache_key to make it easier to cache Active Records in combination with the new ActiveSupport::Cache::* libraries [DHH] +* Added ActiveRecord::Base.cache_key to make it easier to cache Active Records in combination with the new ActiveSupport::Cache::* libraries [David Heinemeier Hansson] * Make sure CSV fixtures are compatible with ruby 1.9's new csv implementation. [JEG2] * Added by parameter to increment, decrement, and their bang varieties so you can do player1.increment!(:points, 5) #10542 [Sam] -* Optimize ActiveRecord::Base#exists? to use #select_all instead of #find. Closes #10605 [jamesh, fcheung, protocool] +* Optimize ActiveRecord::Base#exists? to use #select_all instead of #find. Closes #10605 [jamesh, Frederick Cheung, protocool] * Don't unnecessarily load has_many associations in after_update callbacks. Closes #6822 [stopdropandrew, canadaduane] @@ -282,11 +282,11 @@ *2.0.2* (December 16th, 2007) -* Ensure optimistic locking handles nil #lock_version values properly. Closes #10510 [rick] +* Ensure optimistic locking handles nil #lock_version values properly. Closes #10510 [Rick Olson] * Make the Fixtures Test::Unit enhancements more supporting for double-loaded test cases. Closes #10379 [brynary] -* Fix that validates_acceptance_of still works for non-existent tables (useful for bootstrapping new databases). Closes #10474 [hasmanyjosh] +* Fix that validates_acceptance_of still works for non-existent tables (useful for bootstrapping new databases). Closes #10474 [Josh Susser] * Ensure that the :uniq option for has_many :through associations retains the order. #10463 [remvee] @@ -297,19 +297,19 @@ *2.0.1* (December 7th, 2007) -* Removed query cache rescue as it could cause code to be run twice (closes #10408) [DHH] +* Removed query cache rescue as it could cause code to be run twice (closes #10408) [David Heinemeier Hansson] *2.0.0* (December 6th, 2007) * Anchor DateTimeTest to fixed DateTime instead of a variable value based on Time.now#advance#to_datetime, so that this test passes on 64-bit platforms running Ruby 1.8.6+ [Geoff Buesing] -* Fixed that the Query Cache should just be ignored if the database is misconfigured (so that the "About your applications environment" works even before the database has been created) [DHH] +* Fixed that the Query Cache should just be ignored if the database is misconfigured (so that the "About your applications environment" works even before the database has been created) [David Heinemeier Hansson] * Fixed that the truncation of strings longer than 50 chars should use inspect so newlines etc are escaped #10385 [Norbert Crombach] -* Fixed that habtm associations should be able to set :select as part of their definition and have that honored [DHH] +* Fixed that habtm associations should be able to set :select as part of their definition and have that honored [David Heinemeier Hansson] * Document how the :include option can be used in Calculations::calculate. Closes #7446 [adamwiggins, ultimoamore] @@ -319,7 +319,7 @@ so newlines etc are escaped #10385 [Norbert Crombach] * More complete documentation for find_by_sql. Closes #7912 [fearoffish] -* Added ActiveRecord::Base#becomes to turn a record into one of another class (mostly relevant for STIs) [DHH]. Example: +* Added ActiveRecord::Base#becomes to turn a record into one of another class (mostly relevant for STIs) [David Heinemeier Hansson]. Example: render :partial => @client.becomes(Company) # renders companies/company instead of clients/client @@ -345,25 +345,25 @@ so newlines etc are escaped #10385 [Norbert Crombach] * attr_readonly behaves well with optimistic locking. #10188 [Nick Bugajski] -* Base#to_xml supports the nil="true" attribute like Hash#to_xml. #8268 [Catfish] +* Base#to_xml supports the nil="true" attribute like Hash#to_xml. #8268 [Jonathan del Strother] -* Change plings to the more conventional quotes in the documentation. Closes #10104 [danger] +* Change plings to the more conventional quotes in the documentation. Closes #10104 [Jack Danger Canty] -* Fix HasManyThrough Association so it uses :conditions on the HasMany Association. Closes #9729 [danger] +* Fix HasManyThrough Association so it uses :conditions on the HasMany Association. Closes #9729 [Jack Danger Canty] * Ensure that column names are quoted. Closes #10134 [wesley.moxam] -* Smattering of grammatical fixes to documentation. Closes #10083 [BobSilva] +* Smattering of grammatical fixes to documentation. Closes #10083 [Bob Silva] -* Enhance explanation with more examples for attr_accessible macro. Closes #8095 [fearoffish, Marcel Molina] +* Enhance explanation with more examples for attr_accessible macro. Closes #8095 [fearoffish, Marcel Molina Jr.] * Update association/method mapping table to refected latest collection methods for has_many :through. Closes #8772 [Pratik Naik] -* Explain semantics of having several different AR instances in a transaction block. Closes #9036 [jacobat, Marcel Molina] +* Explain semantics of having several different AR instances in a transaction block. Closes #9036 [jacobat, Marcel Molina Jr.] -* Update Schema documentation to use updated sexy migration notation. Closes #10086 [sjgman9] +* Update Schema documentation to use updated sexy migration notation. Closes #10086 [Sam Granieri] -* Make fixtures work with the new test subclasses. [Tarmo Tänav, Koz] +* Make fixtures work with the new test subclasses. [Tarmo Tänav, Michael Koziarski] * Introduce finder :joins with associations. Same :include syntax but with inner rather than outer joins. #10012 [RubyRedRick] # Find users with an avatar @@ -374,7 +374,7 @@ so newlines etc are escaped #10385 [Norbert Crombach] * Associations: speedup duplicate record check. #10011 [Pratik Naik] -* Make sure that << works on has_many associations on unsaved records. Closes #9989 [hasmanyjosh] +* Make sure that << works on has_many associations on unsaved records. Closes #9989 [Josh Susser] * Allow association redefinition in subclasses. #9346 [wildchild] @@ -397,7 +397,7 @@ so newlines etc are escaped #10385 [Norbert Crombach] * Use VALID_FIND_OPTIONS when resolving :find scoping rather than hard coding the list of valid find options. Closes #9443 [sur] -* Limited eager loading no longer ignores scoped :order. Closes #9561 [danger, Josh Peek] +* Limited eager loading no longer ignores scoped :order. Closes #9561 [Jack Danger Canty, Josh Peek] * Assigning an instance of a foreign class to a composed_of aggregate calls an optional conversion block. Refactor and simplify composed_of implementation. #6322 [brandon, Chris Cruft] @@ -410,7 +410,7 @@ so newlines etc are escaped #10385 [Norbert Crombach] * Complete the assimilation of Sexy Migrations from ErrFree [Chris Wanstrath, PJ Hyett] http://errtheblog.com/post/2381 -* Qualified column names work in hash conditions, like :conditions => { 'comments.created_at' => ... }. #9733 [danger] +* Qualified column names work in hash conditions, like :conditions => { 'comments.created_at' => ... }. #9733 [Jack Danger Canty] * Fix regression where the association would not construct new finder SQL on save causing bogus queries for "WHERE owner_id = NULL" even after owner was saved. #8713 [Bryan Helmkamp] @@ -420,11 +420,11 @@ so newlines etc are escaped #10385 [Norbert Crombach] * Alias association #build to #new so it behaves predictably. #8787 [Pratik Naik] -* Add notes to documentation regarding attr_readonly behavior with counter caches and polymorphic associations. Closes #9835 [saimonmoore, rick] +* Add notes to documentation regarding attr_readonly behavior with counter caches and polymorphic associations. Closes #9835 [saimonmoore, Rick Olson] * Observers can observe model names as symbols properly now. Closes #9869 [queso] -* find_and_(initialize|create)_by methods can now properly initialize protected attributes [Tobias Luetke] +* find_and_(initialize|create)_by methods can now properly initialize protected attributes [Tobias Lütke] * belongs_to infers the foreign key from the association name instead of from the class name. [Jeremy Kemper] @@ -443,16 +443,16 @@ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Bea * Allow change_column to set NOT NULL in the PostgreSQL adapter [Tarmo Tänav] -* Fix that ActiveRecord would create attribute methods and override custom attribute getters if the method is also defined in Kernel.methods. [Rick] +* Fix that ActiveRecord would create attribute methods and override custom attribute getters if the method is also defined in Kernel.methods. [Rick Olson] -* Don't call attr_readonly on polymorphic belongs_to associations, in case it matches the name of some other non-ActiveRecord class/module. [Rick] +* Don't call attr_readonly on polymorphic belongs_to associations, in case it matches the name of some other non-ActiveRecord class/module. [Rick Olson] * Try loading activerecord-<adaptername>-adapter gem before trying a plain require so you can use custom gems for the bundled adapters. Also stops gems from requiring an adapter from an old Active Record gem. [Jeremy Kemper, Derrick Spell] *2.0.0 [Preview Release]* (September 29th, 2007) [Includes duplicates of changes from 1.14.2 - 1.15.3] -* Add attr_readonly to specify columns that are skipped during a normal ActiveRecord #save operation. Closes #6896 [dcmanges] +* Add attr_readonly to specify columns that are skipped during a normal ActiveRecord #save operation. Closes #6896 [Dan Manges] class Comment < ActiveRecord::Base # Automatically sets Article#comments_count as readonly. @@ -463,7 +463,7 @@ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Bea attr_readonly :approved_comments_count end -* Make size for has_many :through use counter cache if it exists. Closes #9734 [xaviershay] +* Make size for has_many :through use counter cache if it exists. Closes #9734 [Xavier Shay] * Remove DB2 adapter since IBM chooses to maintain their own adapter instead. [Jeremy Kemper] @@ -479,9 +479,9 @@ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Bea * Added the possibility of using symbols in addition to concrete classes with ActiveRecord::Observer#observe. #3998 [Robby Russell, Tarmo Tänav] -* Added ActiveRecord::Base#to_json/from_json [DHH, Cheah Chu Yeow] +* Added ActiveRecord::Base#to_json/from_json [David Heinemeier Hansson, Cheah Chu Yeow] -* Added ActiveRecord::Base#from_xml [DHH]. Example: +* Added ActiveRecord::Base#from_xml [David Heinemeier Hansson]. Example: xml = "<person><name>David</name></person>" Person.new.from_xml(xml).name # => "David" @@ -516,27 +516,27 @@ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Bea * Explicitly require active_record/query_cache before using it. [Jeremy Kemper] -* Fix bug where unserializing an attribute attempts to modify a frozen @attributes hash for a deleted record. [Rick, marclove] +* Fix bug where unserializing an attribute attempts to modify a frozen @attributes hash for a deleted record. [Rick Olson, marclove] * Performance: absorb instantiate and initialize_with_callbacks into the Base methods. [Jeremy Kemper] -* Fixed that eager loading queries and with_scope should respect the :group option [DHH] +* Fixed that eager loading queries and with_scope should respect the :group option [David Heinemeier Hansson] * Improve performance and functionality of the postgresql adapter. Closes #8049 [roderickvd] For more information see: http://dev.rubyonrails.org/ticket/8049 -* Don't clobber includes passed to has_many.count [danger] +* Don't clobber includes passed to has_many.count [Jack Danger Canty] -* Make sure has_many uses :include when counting [danger] +* Make sure has_many uses :include when counting [Jack Danger Canty] -* Change the implementation of ActiveRecord's attribute reader and writer methods [nzkoz] +* Change the implementation of ActiveRecord's attribute reader and writer methods [Michael Koziarski] - Generate Reader and Writer methods which cache attribute values in hashes. This is to avoid repeatedly parsing the same date or integer columns. - Change exception raised when users use find with :select then try to access a skipped column. Plugins could override missing_attribute() to lazily load the columns. - Move method definition to the class, instead of the instance - Always generate the readers, writers and predicate methods. -* Perform a deep #dup on query cache results so that modifying activerecord attributes does not modify the cached attributes. [Rick] +* Perform a deep #dup on query cache results so that modifying activerecord attributes does not modify the cached attributes. [Rick Olson] # Ensure that has_many :through associations use a count query instead of loading the target when #size is called. Closes #8800 [Pratik Naik] @@ -556,7 +556,7 @@ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Bea * Remove deprecated count(conditions=nil, joins=nil) usage. Closes #8993 [Pratik Naik] -* Change belongs_to so that the foreign_key assumption is taken from the association name, not the class name. Closes #8992 [hasmanyjosh] +* Change belongs_to so that the foreign_key assumption is taken from the association name, not the class name. Closes #8992 [Josh Susser] OLD belongs_to :visitor, :class_name => 'User' # => inferred foreign_key is user_id @@ -570,7 +570,7 @@ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Bea * Move from select * to select tablename.* to avoid clobbering IDs. Closes #8889 [dasil003] -* Don't call unsupported methods on associated objects when using :include, :method with to_xml #7307, [manfred, jwilger] +* Don't call unsupported methods on associated objects when using :include, :method with to_xml #7307, [Manfred Stienstra, jwilger] * Define collection singular ids method for has_many :through associations. #8763 [Pratik Naik] @@ -584,7 +584,7 @@ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Bea * Update tests' use of fixtures for the new collections api. #8726 [Kamal Fariz Mahyuddin] -* Save associated records only if the association is already loaded. #8713 [blaine] +* Save associated records only if the association is already loaded. #8713 [Blaine] * MySQL: fix show_variable. #8448 [matt, Jeremy Kemper] @@ -628,7 +628,7 @@ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Bea * Load database adapters on demand. Eliminates config.connection_adapters and RAILS_CONNECTION_ADAPTERS. Add your lib directory to the $LOAD_PATH and put your custom adapter in lib/active_record/connection_adapters/adaptername_adapter.rb. This way you can provide custom adapters as plugins or gems without modifying Rails. [Jeremy Kemper] -* Ensure that associations with :dependent => :delete_all respect :conditions option. Closes #8034 [danger, Josh Peek, Rick] +* Ensure that associations with :dependent => :delete_all respect :conditions option. Closes #8034 [Jack Danger Canty, Josh Peek, Rick Olson] * belongs_to assignment creates a new proxy rather than modifying its target in-place. #8412 [mmangino@elevatedrails.com] @@ -640,13 +640,13 @@ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Bea * Sanitize Base#inspect. #8392, #8623 [Nik Wakelin, jnoon] -* Replace the transaction {|transaction|..} semantics with a new Exception ActiveRecord::Rollback. [Koz] +* Replace the transaction {|transaction|..} semantics with a new Exception ActiveRecord::Rollback. [Michael Koziarski] * Oracle: extract column length for CHAR also. #7866 [ymendel] * Document :allow_nil option for validates_acceptance_of since it defaults to true. [tzaharia] -* Update documentation for :dependent declaration so that it explicitly uses the non-deprecated API. [danger] +* Update documentation for :dependent declaration so that it explicitly uses the non-deprecated API. [Jack Danger Canty] * Add documentation caveat about when to use count_by_sql. [fearoffish] @@ -656,7 +656,7 @@ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Bea * Add documentation for :encoding option to mysql adapter. [marclove] -* Added short-hand declaration style to migrations (inspiration from Sexy Migrations, http://errtheblog.com/post/2381) [DHH]. Example: +* Added short-hand declaration style to migrations (inspiration from Sexy Migrations, http://errtheblog.com/post/2381) [David Heinemeier Hansson]. Example: create_table "products" do |t| t.column "shop_id", :integer @@ -675,17 +675,17 @@ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Bea t.timestamps end -* Use association name for the wrapper element when using .to_xml. Previous behavior lead to non-deterministic situations with STI and polymorphic associations. [Koz, jstrachan] +* Use association name for the wrapper element when using .to_xml. Previous behavior lead to non-deterministic situations with STI and polymorphic associations. [Michael Koziarski, jstrachan] * Improve performance of calling .create on has_many :through associations. [evan] * Improved cloning performance by relying less on exception raising #8159 [Blaine] -* Added ActiveRecord::Base.inspect to return a column-view like #<Post id:integer, title:string, body:text> [DHH] +* Added ActiveRecord::Base.inspect to return a column-view like #<Post id:integer, title:string, body:text> [David Heinemeier Hansson] -* Added yielding of Builder instance for ActiveRecord::Base#to_xml calls [DHH] +* Added yielding of Builder instance for ActiveRecord::Base#to_xml calls [David Heinemeier Hansson] -* Small additions and fixes for ActiveRecord documentation. Closes #7342 [jeremymcanally] +* Small additions and fixes for ActiveRecord documentation. Closes #7342 [Jeremy McAnally] * Add helpful debugging info to the ActiveRecord::StatementInvalid exception in ActiveRecord::ConnectionAdapters::SqliteAdapter#table_structure. Closes #7925. [court3nay] @@ -695,13 +695,13 @@ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Bea * Base.update_all :order and :limit options. Useful for MySQL updates that must be ordered to avoid violating unique constraints. [Jeremy Kemper] -* Remove deprecated object transactions. People relying on this functionality should install the object_transactions plugin at http://code.bitsweat.net/svn/object_transactions. Closes #5637 [Koz, Jeremy Kemper] +* Remove deprecated object transactions. People relying on this functionality should install the object_transactions plugin at http://code.bitsweat.net/svn/object_transactions. Closes #5637 [Michael Koziarski, Jeremy Kemper] * PostgreSQL: remove DateTime -> Time downcast. Warning: do not enable translate_results for the C bindings if you have timestamps outside Time's domain. [Jeremy Kemper] * find_or_create_by_* takes a hash so you can create with more attributes than are in the method name. For example, Person.find_or_create_by_name(:name => 'Henry', :comments => 'Hi new user!') is equivalent to Person.find_by_name('Henry') || Person.create(:name => 'Henry', :comments => 'Hi new user!'). #7368 [Josh Susser] -* Make sure with_scope takes both :select and :joins into account when setting :readonly. Allows you to save records you retrieve using method_missing on a has_many :through associations. [Koz] +* Make sure with_scope takes both :select and :joins into account when setting :readonly. Allows you to save records you retrieve using method_missing on a has_many :through associations. [Michael Koziarski] * Allow a polymorphic :source for has_many :through associations. Closes #7143 [protocool] @@ -726,13 +726,13 @@ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Bea * Test DateTime native type in migrations, including an edge case with dates during calendar reform. #7649, #7724 [fedot, Geoff Buesing] -* SQLServer: correctly schema-dump tables with no indexes or descending indexes. #7333, #7703 [Jakob S, Tom Ward] +* SQLServer: correctly schema-dump tables with no indexes or descending indexes. #7333, #7703 [Jakob Skjerning, Tom Ward] * SQLServer: recognize real column type as Ruby float. #7057 [sethladd, Tom Ward] -* Added fixtures :all as a way of loading all fixtures in the fixture directory at once #7214 [manfred] +* Added fixtures :all as a way of loading all fixtures in the fixture directory at once #7214 [Manfred Stienstra] -* Added database connection as a yield parameter to ActiveRecord::Base.transaction so you can manually rollback [DHH]. Example: +* Added database connection as a yield parameter to ActiveRecord::Base.transaction so you can manually rollback [David Heinemeier Hansson]. Example: transaction do |transaction| david.withdrawal(100) @@ -742,14 +742,14 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Made increment_counter/decrement_counter play nicely with optimistic locking, and added a more general update_counters method [Jamis Buck] -* Reworked David's query cache to be available as Model.cache {...}. For the duration of the block no select query should be run more then once. Any inserts/deletes/executes will flush the whole cache however [Tobias Luetke] +* Reworked David's query cache to be available as Model.cache {...}. For the duration of the block no select query should be run more then once. Any inserts/deletes/executes will flush the whole cache however [Tobias Lütke] Task.cache { Task.find(1); Task.find(1) } #=> 1 query * When dealing with SQLite3, use the table_info pragma helper, so that the bindings can do some translation for when sqlite3 breaks incompatibly between point releases. [Jamis Buck] * Oracle: fix lob and text default handling. #7344 [gfriedrich, Michael Schoen] -* SQLServer: don't choke on strings containing 'null'. #7083 [Jakob S] +* SQLServer: don't choke on strings containing 'null'. #7083 [Jakob Skjerning] * MySQL: blob and text columns may not have defaults in 5.x. Update fixtures schema for strict mode. #6695 [Dan Kubb] @@ -759,7 +759,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Use Date#to_s(:db) for quoted dates. #7411 [Michael Schoen] -* Don't create instance writer methods for class attributes. Closes #7401 [Rick] +* Don't create instance writer methods for class attributes. Closes #7401 [Rick Olson] * Docs: validations examples. #7343 [zackchandler] @@ -779,11 +779,11 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Make sure sqlite3 driver closes open connections on disconnect [Rob Rasmussen] -* [DOC] clear up some ambiguity with the way has_and_belongs_to_many creates the default join table name. #7072 [jeremymcanally] +* [DOC] clear up some ambiguity with the way has_and_belongs_to_many creates the default join table name. #7072 [Jeremy McAnally] * change_column accepts :default => nil. Skip column options for primary keys. #6956, #7048 [Dan Manges, Jeremy Kemper] -* MySQL, PostgreSQL: change_column_default quotes the default value and doesn't lose column type information. #3987, #6664 [Jonathan Viney, manfred, altano@bigfoot.com] +* MySQL, PostgreSQL: change_column_default quotes the default value and doesn't lose column type information. #3987, #6664 [Jonathan Viney, Manfred Stienstra, altano@bigfoot.com] * Oracle: create_table takes a :sequence_name option to override the 'tablename_seq' default. #7000 [Michael Schoen] @@ -818,15 +818,15 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * fix faulty inheritance tests and that eager loading grabs the wrong inheritance column when the class of your association is an STI subclass. Closes #6859 [protocool] -* Consolidated different create and create! versions to call through to the base class with scope. This fixes inconsistencies, especially related to protected attribtues. Closes #5847 [Alexander Dymo, Tobias Luetke] +* Consolidated different create and create! versions to call through to the base class with scope. This fixes inconsistencies, especially related to protected attribtues. Closes #5847 [Alexander Dymo, Tobias Lütke] * find supports :lock with :include. Check whether your database allows SELECT ... FOR UPDATE with outer joins before using. #6764 [vitaly, Jeremy Kemper] * Add AssociationCollection#create! to be consistent with AssociationCollection#create when dealing with a foreign key that is a protected attribute [Cody Fauser] -* Added counter optimization for AssociationCollection#any? so person.friends.any? won't actually load the full association if we have the count in a cheaper form [DHH] +* Added counter optimization for AssociationCollection#any? so person.friends.any? won't actually load the full association if we have the count in a cheaper form [David Heinemeier Hansson] -* Change fixture_path to a class inheritable accessor allowing test cases to have their own custom set of fixtures. #6672 [zdennis] +* Change fixture_path to a class inheritable accessor allowing test cases to have their own custom set of fixtures. #6672 [Zach Dennis] * Quote ActiveSupport::Multibyte::Chars. #6653 [Julian Tarkhanov] @@ -881,15 +881,15 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Fix has_many :through to add the appropriate conditions when going through an association using STI. Closes #5783. [Jonathan Viney] -* fix select_limited_ids_list issues in postgresql, retain current behavior in other adapters [Rick] +* fix select_limited_ids_list issues in postgresql, retain current behavior in other adapters [Rick Olson] -* Restore eager condition interpolation, document it's differences [Rick] +* Restore eager condition interpolation, document it's differences [Rick Olson] * Don't rollback in teardown unless a transaction was started. Don't start a transaction in create_fixtures if a transaction is started. #6282 [Jacob Fugal, Jeremy Kemper] * Add #delete support to has_many :through associations. Closes #6049 [Martin Landers] -* Reverted old select_limited_ids_list postgresql fix that caused issues in mysql. Closes #5851 [Rick] +* Reverted old select_limited_ids_list postgresql fix that caused issues in mysql. Closes #5851 [Rick Olson] * Removes the ability for eager loaded conditions to be interpolated, since there is no model instance to use as a context for interpolation. #5553 [turnip@turnipspatch.com] @@ -897,7 +897,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Added update_attributes! which uses save! to raise an exception if a validation error prevents saving #6192 [jonathan] -* Deprecated add_on_boundary_breaking (use validates_length_of instead) #6292 [BobSilva] +* Deprecated add_on_boundary_breaking (use validates_length_of instead) #6292 [Bob Silva] * The has_many create method works with polymorphic associations. #6361 [Dan Peterson] @@ -913,9 +913,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * has_one associations with a nil target may be safely marshaled. #6279 [norbauer, Jeremy Kemper] -* Duplicate the hash provided to AR::Base#to_xml to prevent unexpected side effects [Koz] +* Duplicate the hash provided to AR::Base#to_xml to prevent unexpected side effects [Michael Koziarski] -* Add a :namespace option to AR::Base#to_xml [Koz] +* Add a :namespace option to AR::Base#to_xml [Michael Koziarski] * Deprecation tests. Remove warnings for dynamic finders and for the foo_count method if it's also an attribute. [Jeremy Kemper] @@ -923,7 +923,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Improve yaml fixtures error reporting. #6205 [Bruce Williams] -* Rename AR::Base#quote so people can use that name in their models. #3628 [Koz] +* Rename AR::Base#quote so people can use that name in their models. #3628 [Michael Koziarski] * Add deprecation warning for inferred foreign key. #6029 [Josh Susser] @@ -937,7 +937,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * to_xml: the :methods option works on arrays of records. #5845 [Josh Starcher] -* Deprecation: update docs. #5998 [jakob@mentalized.net, Kevin Clark] +* Deprecation: update docs. #5998 [Jakob Skjerning, Kevin Clark] * Add some XmlSerialization tests for ActiveRecord [Rick Olson] @@ -963,9 +963,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * MySQL: update test schema for MySQL 5 strict mode. #5861 [Tom Ward] -* to_xml: correct naming of included associations. #5831 [josh.starcher@gmail.com] +* to_xml: correct naming of included associations. #5831 [Josh Starcher] -* Pushing a record onto a has_many :through sets the association's foreign key to the associate's primary key and adds it to the correct association. #5815, #5829 [josh@hasmanythrough.com] +* Pushing a record onto a has_many :through sets the association's foreign key to the associate's primary key and adds it to the correct association. #5815, #5829 [Josh Susser] * Add records to has_many :through using <<, push, and concat by creating the association record. Raise if base or associate are new records since both ids are required to create the association. #build raises since you can't associate an unsaved record. #create! takes an attributes hash and creates the associated record and its association in a transaction. [Jeremy Kemper] @@ -981,7 +981,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Cache nil results for :included has_one associations also. #5787 [Michael Schoen] -* Fixed a bug which would cause .save to fail after trying to access a empty has_one association on a unsaved record. [Tobias Luetke] +* Fixed a bug which would cause .save to fail after trying to access a empty has_one association on a unsaved record. [Tobias Lütke] * Nested classes are given table names prefixed by the singular form of the parent's table name. [Jeremy Kemper] Example: Invoice::Lineitem is given table name invoice_lineitems @@ -1011,7 +1011,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar] -* Cache nil results for has_one associations so multiple calls don't call the database. Closes #5757. [Michael A. Schoen] +* Cache nil results for has_one associations so multiple calls don't call the database. Closes #5757. [Michael Schoen] * Add documentation for how to disable timestamps on a per model basis. Closes #5684. [matt@mattmargolis.net Marcel Molina Jr.] @@ -1019,9 +1019,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Refactor ActiveRecord::Base.reset_subclasses to #reset, and add global observer resetting. [Rick Olson] -* Formally deprecate the deprecated finders. [Koz] +* Formally deprecate the deprecated finders. [Michael Koziarski] -* Formally deprecate rich associations. [Koz] +* Formally deprecate rich associations. [Michael Koziarski] * Fixed that default timezones for new / initialize should uphold utc setting #5709 [daniluk@yahoo.com] @@ -1055,7 +1055,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * SQLServer: fix db:schema:dump case-sensitivity. #4684 [Will Rogers] -* Oracle: BigDecimal support. #5667 [schoenm@earthlink.net] +* Oracle: BigDecimal support. #5667 [Michael Schoen] * Numeric and decimal columns map to BigDecimal instead of Float. Those with scale 0 map to Integer. #5454 [robbat2@gentoo.org, work@ashleymoran.me.uk] @@ -1071,9 +1071,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Clearer has_one/belongs_to model names (account has_one :user). #5632 [matt@mattmargolis.net] -* Oracle: use nonblocking queries if allow_concurrency is set, fix pessimistic locking, don't guess date vs. time by default (set OracleAdapter.emulate_dates = true for the old behavior), adapter cleanup. #5635 [schoenm@earthlink.net] +* Oracle: use nonblocking queries if allow_concurrency is set, fix pessimistic locking, don't guess date vs. time by default (set OracleAdapter.emulate_dates = true for the old behavior), adapter cleanup. #5635 [Michael Schoen] -* Fixed a few Oracle issues: Allows Oracle's odd date handling to still work consistently within #to_xml, Passes test that hardcode insert statement by dropping the :id column, Updated RUNNING_UNIT_TESTS with Oracle instructions, Corrects method signature for #exec #5294 [schoenm@earthlink.net] +* Fixed a few Oracle issues: Allows Oracle's odd date handling to still work consistently within #to_xml, Passes test that hardcode insert statement by dropping the :id column, Updated RUNNING_UNIT_TESTS with Oracle instructions, Corrects method signature for #exec #5294 [Michael Schoen] * Added :group to available options for finds done on associations #5516 [mike@michaeldewey.org] @@ -1108,9 +1108,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Use explicit delegation instead of method aliasing for AR::Base.to_param -> AR::Base.id. #5299 (skaes@web.de) -* Refactored ActiveRecord::Base.to_xml to become a delegate for XmlSerializer, which restores sanity to the mega method. This refactoring also reinstates the opinions that type="string" is redundant and ugly and nil-differentiation is not a concern of serialization [DHH] +* Refactored ActiveRecord::Base.to_xml to become a delegate for XmlSerializer, which restores sanity to the mega method. This refactoring also reinstates the opinions that type="string" is redundant and ugly and nil-differentiation is not a concern of serialization [David Heinemeier Hansson] -* Added simple hash conditions to find that'll just convert hash to an AND-based condition string #5143 [hcatlin@gmail.com]. Example: +* Added simple hash conditions to find that'll just convert hash to an AND-based condition string #5143 [Hampton Catlin]. Example: Person.find(:all, :conditions => { :last_name => "Catlin", :status => 1 }, :limit => 2) @@ -1141,26 +1141,26 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] Foo.find(:all, :conditions => ['bar_id IN (?)', bars]) Foo.find(:first, :conditions => ['bar_id = ?', bar]) -* Fixed that Base.find :all, :conditions => [ "id IN (?)", collection ] would fail if collection was empty [DHH] +* Fixed that Base.find :all, :conditions => [ "id IN (?)", collection ] would fail if collection was empty [David Heinemeier Hansson] -* Add a list of regexes assert_queries skips in the ActiveRecord test suite. [Rick] +* Add a list of regexes assert_queries skips in the ActiveRecord test suite. [Rick Olson] -* Fix the has_and_belongs_to_many #create doesn't populate the join for new records. Closes #3692 [josh@hasmanythrough.com] +* Fix the has_and_belongs_to_many #create doesn't populate the join for new records. Closes #3692 [Josh Susser] * Provide Association Extensions access to the instance that the association is being accessed from. - Closes #4433 [josh@hasmanythrough.com] + Closes #4433 [Josh Susser] * Update OpenBase adaterp's maintainer's email address. Closes #5176. [Derrick Spell] -* Add a quick note about :select and eagerly included associations. [Rick] +* Add a quick note about :select and eagerly included associations. [Rick Olson] * Add docs for the :as option in has_one associations. Closes #5144 [cdcarter@gmail.com] -* Fixed that has_many collections shouldn't load the entire association to do build or create [DHH] +* Fixed that has_many collections shouldn't load the entire association to do build or create [David Heinemeier Hansson] -* Added :allow_nil option for aggregations #5091 [ian.w.white@gmail.com] +* Added :allow_nil option for aggregations #5091 [Ian White] -* Fix Oracle boolean support and tests. Closes #5139. [schoenm@earthlink.net] +* Fix Oracle boolean support and tests. Closes #5139. [Michael Schoen] * create! no longer blows up when no attributes are passed and a :create scope is in effect (e.g. foo.bars.create! failed whereas foo.bars.create!({}) didn't.) [Jeremy Kemper] @@ -1198,7 +1198,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Add warning about the proper way to validate the presence of a foreign key. Closes #4147. [Francois Beausoleil <francois.beausoleil@gmail.com>] -* Fix syntax error in documentation. Closes #4679. [mislav@nippur.irb.hr] +* Fix syntax error in documentation. Closes #4679. [Mislav Marohnić] * Add Oracle support for CLOB inserts. Closes #4748. [schoenm@earthlink.net sandra.metz@duke.edu] @@ -1212,14 +1212,14 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Sybase Adapter type conversion cleanup. Closes #4736. [dev@metacasa.net] -* Fix bug where calculations with long alias names return null. [Rick] +* Fix bug where calculations with long alias names return null. [Rick Olson] -* Raise error when trying to add to a has_many :through association. Use the Join Model instead. [Rick] +* Raise error when trying to add to a has_many :through association. Use the Join Model instead. [Rick Olson] @post.tags << @tag # BAD @post.taggings.create(:tag => @tag) # GOOD -* Allow all calculations to take the :include option, not just COUNT (closes #4840) [Rick] +* Allow all calculations to take the :include option, not just COUNT (closes #4840) [Rick Olson] * Update inconsistent migrations documentation. #4683 [machomagna@gmail.com] @@ -1227,17 +1227,17 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Properly quote index names in migrations (closes #4764) [John Long] -* Fix the HasManyAssociation#count method so it uses the new ActiveRecord::Base#count syntax, while maintaining backwards compatibility. [Rick] +* Fix the HasManyAssociation#count method so it uses the new ActiveRecord::Base#count syntax, while maintaining backwards compatibility. [Rick Olson] -* Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick] +* Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick Olson] -* Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick] +* Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick Olson] * DRY up association collection reader method generation. [Marcel Molina Jr.] * DRY up and tweak style of the validation error object. [Marcel Molina Jr.] -* Add :case_sensitive option to validates_uniqueness_of (closes #3090) [Rick] +* Add :case_sensitive option to validates_uniqueness_of (closes #3090) [Rick Olson] class Account < ActiveRecord::Base validates_uniqueness_of :email, :case_sensitive => false @@ -1262,14 +1262,14 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] *1.15.2* (February 5th, 2007) -* Pass a range in :conditions to use the SQL BETWEEN operator. #6974 [dcmanges] +* Pass a range in :conditions to use the SQL BETWEEN operator. #6974 [Dan Manges] Student.find(:all, :conditions => { :grade => 9..12 }) -* Don't create instance writer methods for class attributes. [Rick] +* Don't create instance writer methods for class attributes. [Rick Olson] * When dealing with SQLite3, use the table_info pragma helper, so that the bindings can do some translation for when sqlite3 breaks incompatibly between point releases. [Jamis Buck] -* SQLServer: don't choke on strings containing 'null'. #7083 [Jakob S] +* SQLServer: don't choke on strings containing 'null'. #7083 [Jakob Skjerning] * Consistently use LOWER() for uniqueness validations (rather than mixing with UPPER()) so the database can always use a functional index on the lowercased column. #6495 [Si] @@ -1287,11 +1287,11 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] *1.15.0* (January 16th, 2007) -* [DOC] clear up some ambiguity with the way has_and_belongs_to_many creates the default join table name. #7072 [jeremymcanally] +* [DOC] clear up some ambiguity with the way has_and_belongs_to_many creates the default join table name. #7072 [Jeremy McAnally] -* change_column accepts :default => nil. Skip column options for primary keys. #6956, #7048 [dcmanges, Jeremy Kemper] +* change_column accepts :default => nil. Skip column options for primary keys. #6956, #7048 [Dan Manges, Jeremy Kemper] -* MySQL, PostgreSQL: change_column_default quotes the default value and doesn't lose column type information. #3987, #6664 [Jonathan Viney, manfred, altano@bigfoot.com] +* MySQL, PostgreSQL: change_column_default quotes the default value and doesn't lose column type information. #3987, #6664 [Jonathan Viney, Manfred Stienstra, altano@bigfoot.com] * Oracle: create_table takes a :sequence_name option to override the 'tablename_seq' default. #7000 [Michael Schoen] @@ -1352,15 +1352,15 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Fix has_many :through to add the appropriate conditions when going through an association using STI. Closes #5783. [Jonathan Viney] -* fix select_limited_ids_list issues in postgresql, retain current behavior in other adapters [Rick] +* fix select_limited_ids_list issues in postgresql, retain current behavior in other adapters [Rick Olson] -* Restore eager condition interpolation, document it's differences [Rick] +* Restore eager condition interpolation, document it's differences [Rick Olson] * Don't rollback in teardown unless a transaction was started. Don't start a transaction in create_fixtures if a transaction is started. #6282 [Jacob Fugal, Jeremy Kemper] * Add #delete support to has_many :through associations. Closes #6049 [Martin Landers] -* Reverted old select_limited_ids_list postgresql fix that caused issues in mysql. Closes #5851 [Rick] +* Reverted old select_limited_ids_list postgresql fix that caused issues in mysql. Closes #5851 [Rick Olson] * Removes the ability for eager loaded conditions to be interpolated, since there is no model instance to use as a context for interpolation. #5553 [turnip@turnipspatch.com] @@ -1368,7 +1368,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Added update_attributes! which uses save! to raise an exception if a validation error prevents saving #6192 [jonathan] -* Deprecated add_on_boundary_breaking (use validates_length_of instead) #6292 [BobSilva] +* Deprecated add_on_boundary_breaking (use validates_length_of instead) #6292 [Bob Silva] * The has_many create method works with polymorphic associations. #6361 [Dan Peterson] @@ -1384,9 +1384,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * has_one associations with a nil target may be safely marshaled. #6279 [norbauer, Jeremy Kemper] -* Duplicate the hash provided to AR::Base#to_xml to prevent unexpected side effects [Koz] +* Duplicate the hash provided to AR::Base#to_xml to prevent unexpected side effects [Michael Koziarski] -* Add a :namespace option to AR::Base#to_xml [Koz] +* Add a :namespace option to AR::Base#to_xml [Michael Koziarski] * Deprecation tests. Remove warnings for dynamic finders and for the foo_count method if it's also an attribute. [Jeremy Kemper] @@ -1394,7 +1394,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Improve yaml fixtures error reporting. #6205 [Bruce Williams] -* Rename AR::Base#quote so people can use that name in their models. #3628 [Koz] +* Rename AR::Base#quote so people can use that name in their models. #3628 [Michael Koziarski] * Add deprecation warning for inferred foreign key. #6029 [Josh Susser] @@ -1424,9 +1424,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * MySQL: update test schema for MySQL 5 strict mode. #5861 [Tom Ward] -* to_xml: correct naming of included associations. #5831 [josh.starcher@gmail.com] +* to_xml: correct naming of included associations. #5831 [Josh Starcher] -* Pushing a record onto a has_many :through sets the association's foreign key to the associate's primary key and adds it to the correct association. #5815, #5829 [josh@hasmanythrough.com] +* Pushing a record onto a has_many :through sets the association's foreign key to the associate's primary key and adds it to the correct association. #5815, #5829 [Josh Susser] * Add records to has_many :through using <<, push, and concat by creating the association record. Raise if base or associate are new records since both ids are required to create the association. #build raises since you can't associate an unsaved record. #create! takes an attributes hash and creates the associated record and its association in a transaction. [Jeremy Kemper] @@ -1442,7 +1442,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Cache nil results for :included has_one associations also. #5787 [Michael Schoen] -* Fixed a bug which would cause .save to fail after trying to access a empty has_one association on a unsaved record. [Tobias Luetke] +* Fixed a bug which would cause .save to fail after trying to access a empty has_one association on a unsaved record. [Tobias Lütke] * Nested classes are given table names prefixed by the singular form of the parent's table name. [Jeremy Kemper] Example: Invoice::Lineitem is given table name invoice_lineitems @@ -1470,15 +1470,15 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar] -* Cache nil results for has_one associations so multiple calls don't call the database. Closes #5757. [Michael A. Schoen] +* Cache nil results for has_one associations so multiple calls don't call the database. Closes #5757. [Michael Schoen] * Don't save has_one associations unnecessarily. #5735 [Jonathan Viney] * Refactor ActiveRecord::Base.reset_subclasses to #reset, and add global observer resetting. [Rick Olson] -* Formally deprecate the deprecated finders. [Koz] +* Formally deprecate the deprecated finders. [Michael Koziarski] -* Formally deprecate rich associations. [Koz] +* Formally deprecate rich associations. [Michael Koziarski] * Fixed that default timezones for new / initialize should uphold utc setting #5709 [daniluk@yahoo.com] @@ -1512,7 +1512,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * SQLServer: fix db:schema:dump case-sensitivity. #4684 [Will Rogers] -* Oracle: BigDecimal support. #5667 [schoenm@earthlink.net] +* Oracle: BigDecimal support. #5667 [Michael Schoen] * Numeric and decimal columns map to BigDecimal instead of Float. Those with scale 0 map to Integer. #5454 [robbat2@gentoo.org, work@ashleymoran.me.uk] @@ -1526,9 +1526,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Clearer has_one/belongs_to model names (account has_one :user). #5632 [matt@mattmargolis.net] -* Oracle: use nonblocking queries if allow_concurrency is set, fix pessimistic locking, don't guess date vs. time by default (set OracleAdapter.emulate_dates = true for the old behavior), adapter cleanup. #5635 [schoenm@earthlink.net] +* Oracle: use nonblocking queries if allow_concurrency is set, fix pessimistic locking, don't guess date vs. time by default (set OracleAdapter.emulate_dates = true for the old behavior), adapter cleanup. #5635 [Michael Schoen] -* Fixed a few Oracle issues: Allows Oracle's odd date handling to still work consistently within #to_xml, Passes test that hardcode insert statement by dropping the :id column, Updated RUNNING_UNIT_TESTS with Oracle instructions, Corrects method signature for #exec #5294 [schoenm@earthlink.net] +* Fixed a few Oracle issues: Allows Oracle's odd date handling to still work consistently within #to_xml, Passes test that hardcode insert statement by dropping the :id column, Updated RUNNING_UNIT_TESTS with Oracle instructions, Corrects method signature for #exec #5294 [Michael Schoen] * Added :group to available options for finds done on associations #5516 [mike@michaeldewey.org] @@ -1561,9 +1561,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Use explicit delegation instead of method aliasing for AR::Base.to_param -> AR::Base.id. #5299 (skaes@web.de) -* Refactored ActiveRecord::Base.to_xml to become a delegate for XmlSerializer, which restores sanity to the mega method. This refactoring also reinstates the opinions that type="string" is redundant and ugly and nil-differentiation is not a concern of serialization [DHH] +* Refactored ActiveRecord::Base.to_xml to become a delegate for XmlSerializer, which restores sanity to the mega method. This refactoring also reinstates the opinions that type="string" is redundant and ugly and nil-differentiation is not a concern of serialization [David Heinemeier Hansson] -* Added simple hash conditions to find that'll just convert hash to an AND-based condition string #5143 [hcatlin@gmail.com]. Example: +* Added simple hash conditions to find that'll just convert hash to an AND-based condition string #5143 [Hampton Catlin]. Example: Person.find(:all, :conditions => { :last_name => "Catlin", :status => 1 }, :limit => 2) @@ -1594,26 +1594,26 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] Foo.find(:all, :conditions => ['bar_id IN (?)', bars]) Foo.find(:first, :conditions => ['bar_id = ?', bar]) -* Fixed that Base.find :all, :conditions => [ "id IN (?)", collection ] would fail if collection was empty [DHH] +* Fixed that Base.find :all, :conditions => [ "id IN (?)", collection ] would fail if collection was empty [David Heinemeier Hansson] -* Add a list of regexes assert_queries skips in the ActiveRecord test suite. [Rick] +* Add a list of regexes assert_queries skips in the ActiveRecord test suite. [Rick Olson] -* Fix the has_and_belongs_to_many #create doesn't populate the join for new records. Closes #3692 [josh@hasmanythrough.com] +* Fix the has_and_belongs_to_many #create doesn't populate the join for new records. Closes #3692 [Josh Susser] * Provide Association Extensions access to the instance that the association is being accessed from. - Closes #4433 [josh@hasmanythrough.com] + Closes #4433 [Josh Susser] * Update OpenBase adaterp's maintainer's email address. Closes #5176. [Derrick Spell] -* Add a quick note about :select and eagerly included associations. [Rick] +* Add a quick note about :select and eagerly included associations. [Rick Olson] * Add docs for the :as option in has_one associations. Closes #5144 [cdcarter@gmail.com] -* Fixed that has_many collections shouldn't load the entire association to do build or create [DHH] +* Fixed that has_many collections shouldn't load the entire association to do build or create [David Heinemeier Hansson] -* Added :allow_nil option for aggregations #5091 [ian.w.white@gmail.com] +* Added :allow_nil option for aggregations #5091 [Ian White] -* Fix Oracle boolean support and tests. Closes #5139. [schoenm@earthlink.net] +* Fix Oracle boolean support and tests. Closes #5139. [Michael Schoen] * create! no longer blows up when no attributes are passed and a :create scope is in effect (e.g. foo.bars.create! failed whereas foo.bars.create!({}) didn't.) [Jeremy Kemper] @@ -1639,7 +1639,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Add warning about the proper way to validate the presence of a foreign key. Closes #4147. [Francois Beausoleil <francois.beausoleil@gmail.com>] -* Fix syntax error in documentation. Closes #4679. [mislav@nippur.irb.hr] +* Fix syntax error in documentation. Closes #4679. [Mislav Marohnić] * Add Oracle support for CLOB inserts. Closes #4748. [schoenm@earthlink.net sandra.metz@duke.edu] @@ -1653,26 +1653,26 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Sybase Adapter type conversion cleanup. Closes #4736. [dev@metacasa.net] -* Fix bug where calculations with long alias names return null. [Rick] +* Fix bug where calculations with long alias names return null. [Rick Olson] -* Raise error when trying to add to a has_many :through association. Use the Join Model instead. [Rick] +* Raise error when trying to add to a has_many :through association. Use the Join Model instead. [Rick Olson] @post.tags << @tag # BAD @post.taggings.create(:tag => @tag) # GOOD -* Allow all calculations to take the :include option, not just COUNT (closes #4840) [Rick] +* Allow all calculations to take the :include option, not just COUNT (closes #4840) [Rick Olson] * Add ActiveRecord::Errors#to_xml [Jamis Buck] * Properly quote index names in migrations (closes #4764) [John Long] -* Fix the HasManyAssociation#count method so it uses the new ActiveRecord::Base#count syntax, while maintaining backwards compatibility. [Rick] +* Fix the HasManyAssociation#count method so it uses the new ActiveRecord::Base#count syntax, while maintaining backwards compatibility. [Rick Olson] -* Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick] +* Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick Olson] -* Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick] +* Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick Olson] -* Add :case_sensitive option to validates_uniqueness_of (closes #3090) [Rick] +* Add :case_sensitive option to validates_uniqueness_of (closes #3090) [Rick Olson] class Account < ActiveRecord::Base validates_uniqueness_of :email, :case_sensitive => false @@ -1689,7 +1689,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Add warning about the proper way to validate the presence of a foreign key. #4147 [Francois Beausoleil <francois.beausoleil@gmail.com>] -* Fix syntax error in documentation. #4679 [mislav@nippur.irb.hr] +* Fix syntax error in documentation. #4679 [Mislav Marohnić] * Update inconsistent migrations documentation. #4683 [machomagna@gmail.com] @@ -1702,9 +1702,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Properly quote index names in migrations (closes #4764) [John Long] -* Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick] +* Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick Olson] -* Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick] +* Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick Olson] *1.14.2* (April 9th, 2006) @@ -1718,17 +1718,17 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Fixed that that multiparameter assignment doesn't work with aggregations (closes #4620) [Lars Pind] -* Enable Limit/Offset in Calculations (closes #4558) [lmarlow@yahoo.com] +* Enable Limit/Offset in Calculations (closes #4558) [lmarlow] -* Fixed that loading including associations returns all results if Load IDs For Limited Eager Loading returns none (closes #4528) [Rick] +* Fixed that loading including associations returns all results if Load IDs For Limited Eager Loading returns none (closes #4528) [Rick Olson] * Fixed HasManyAssociation#find bugs when :finder_sql is set #4600 [lagroue@free.fr] -* Allow AR::Base#respond_to? to behave when @attributes is nil [zenspider] +* Allow AR::Base#respond_to? to behave when @attributes is nil [Ryan Davis] -* Support eager includes when going through a polymorphic has_many association. [Rick] +* Support eager includes when going through a polymorphic has_many association. [Rick Olson] -* Added support for eagerly including polymorphic has_one associations. (closes #4525) [Rick] +* Added support for eagerly including polymorphic has_one associations. (closes #4525) [Rick Olson] class Post < ActiveRecord::Base has_one :tagging, :as => :taggable @@ -1736,9 +1736,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] Post.find :all, :include => :tagging -* Added descriptive error messages for invalid has_many :through associations: going through :has_one or :has_and_belongs_to_many [Rick] +* Added descriptive error messages for invalid has_many :through associations: going through :has_one or :has_and_belongs_to_many [Rick Olson] -* Added support for going through a polymorphic has_many association: (closes #4401) [Rick] +* Added support for going through a polymorphic has_many association: (closes #4401) [Rick Olson] class PhotoCollection < ActiveRecord::Base has_many :photos, :as => :photographic @@ -1756,36 +1756,36 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Changed those private ActiveRecord methods to take optional third argument :auto instead of nil for performance optimizations. (closes #4456) [Stefan] -* Private ActiveRecord methods add_limit!, add_joins!, and add_conditions! take an OPTIONAL third argument 'scope' (closes #4456) [Rick] +* Private ActiveRecord methods add_limit!, add_joins!, and add_conditions! take an OPTIONAL third argument 'scope' (closes #4456) [Rick Olson] -* DEPRECATED: Using additional attributes on has_and_belongs_to_many associations. Instead upgrade your association to be a real join model [DHH] +* DEPRECATED: Using additional attributes on has_and_belongs_to_many associations. Instead upgrade your association to be a real join model [David Heinemeier Hansson] -* Fixed that records returned from has_and_belongs_to_many associations with additional attributes should be marked as read only (fixes #4512) [DHH] +* Fixed that records returned from has_and_belongs_to_many associations with additional attributes should be marked as read only (fixes #4512) [David Heinemeier Hansson] * Do not implicitly mark recordss of has_many :through as readonly but do mark habtm records as readonly (eventually only on join tables without rich attributes). [Marcel Mollina Jr.] -* Fixed broken OCIAdapter #4457 [schoenm@earthlink.net] +* Fixed broken OCIAdapter #4457 [Michael Schoen] *1.14.0* (March 27th, 2006) * Replace 'rescue Object' with a finer grained rescue. Closes #4431. [Nicholas Seckar] -* Fixed eager loading so that an aliased table cannot clash with a has_and_belongs_to_many join table [Rick] +* Fixed eager loading so that an aliased table cannot clash with a has_and_belongs_to_many join table [Rick Olson] * Add support for :include to with_scope [andrew@redlinesoftware.com] -* Support the use of public synonyms with the Oracle adapter; required ruby-oci8 v0.1.14 #4390 [schoenm@earthlink.net] +* Support the use of public synonyms with the Oracle adapter; required ruby-oci8 v0.1.14 #4390 [Michael Schoen] * Change periods (.) in table aliases to _'s. Closes #4251 [jeff@ministrycentered.com] -* Changed has_and_belongs_to_many join to INNER JOIN for Mysql 3.23.x. Closes #4348 [Rick] +* Changed has_and_belongs_to_many join to INNER JOIN for Mysql 3.23.x. Closes #4348 [Rick Olson] -* Fixed issue that kept :select options from being scoped [Rick] +* Fixed issue that kept :select options from being scoped [Rick Olson] -* Fixed db_schema_import when binary types are present #3101 [DHH] +* Fixed db_schema_import when binary types are present #3101 [David Heinemeier Hansson] -* Fixed that MySQL enums should always be returned as strings #3501 [DHH] +* Fixed that MySQL enums should always be returned as strings #3501 [David Heinemeier Hansson] * Change has_many :through to use the :source option to specify the source association. :class_name is now ignored. [Rick Olson] @@ -1816,13 +1816,13 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] end end -* Fixed that schema changes while the database was open would break any connections to a SQLite database (now we reconnect if that error is throw) [DHH] +* Fixed that schema changes while the database was open would break any connections to a SQLite database (now we reconnect if that error is throw) [David Heinemeier Hansson] -* Don't classify the has_one class when eager loading, it is already singular. Add tests. (closes #4117) [jonathan@bluewire.net.nz] +* Don't classify the has_one class when eager loading, it is already singular. Add tests. (closes #4117) [Jonathan Viney] * Quit ignoring default :include options in has_many :through calls [Mark James] -* Allow has_many :through associations to find the source association by setting a custom class (closes #4307) [jonathan@bluewire.net.nz] +* Allow has_many :through associations to find the source association by setting a custom class (closes #4307) [Jonathan Viney] * Eager Loading support added for has_many :through => :has_many associations (see below). [Rick Olson] @@ -1842,13 +1842,13 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] belongs_to :client end -* Raise error when trying to select many polymorphic objects with has_many :through or :include (closes #4226) [josh@hasmanythrough.com] +* Raise error when trying to select many polymorphic objects with has_many :through or :include (closes #4226) [Josh Susser] -* Fixed has_many :through to include :conditions set on the :through association. closes #4020 [jonathan@bluewire.net.nz] +* Fixed has_many :through to include :conditions set on the :through association. closes #4020 [Jonathan Viney] -* Fix that has_many :through honors the foreign key set by the belongs_to association in the join model (closes #4259) [andylien@gmail.com / Rick] +* Fix that has_many :through honors the foreign key set by the belongs_to association in the join model (closes #4259) [andylien@gmail.com / Rick Olson] -* SQL Server adapter gets some love #4298 [rtomayko@gmail.com] +* SQL Server adapter gets some love #4298 [Ryan Tomayko] * Added OpenBase database adapter that builds on top of the http://www.spice-of-life.net/ruby-openbase/ driver. All functionality except LIMIT/OFFSET is supported #3528 [derrickspell@cdmplus.com] @@ -1856,27 +1856,27 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] Author.find(:all, :include => { :posts => :special_comments }, :order => 'special_comments.body') -* Add AbstractAdapter#table_alias_for to create table aliases according to the rules of the current adapter. [Rick] +* Add AbstractAdapter#table_alias_for to create table aliases according to the rules of the current adapter. [Rick Olson] -* Provide access to the underlying database connection through Adapter#raw_connection. Enables the use of db-specific methods without complicating the adapters. #2090 [Koz] +* Provide access to the underlying database connection through Adapter#raw_connection. Enables the use of db-specific methods without complicating the adapters. #2090 [Michael Koziarski] -* Remove broken attempts at handling columns with a default of 'now()' in the postgresql adapter. #2257 [Koz] +* Remove broken attempts at handling columns with a default of 'now()' in the postgresql adapter. #2257 [Michael Koziarski] -* Added connection#current_database that'll return of the current database (only works in MySQL, SQL Server, and Oracle so far -- please help implement for the rest of the adapters) #3663 [Tom ward] +* Added connection#current_database that'll return of the current database (only works in MySQL, SQL Server, and Oracle so far -- please help implement for the rest of the adapters) #3663 [Tom Ward] * Fixed that Migration#execute would have the table name prefix appended to its query #4110 [mark.imbriaco@pobox.com] * Make all tinyint(1) variants act like boolean in mysql (tinyint(1) unsigned, etc.) [Jamis Buck] -* Use association's :conditions when eager loading. [jeremyevans0@gmail.com] #4144 +* Use association's :conditions when eager loading. [Jeremy Evans] #4144 -* Alias the has_and_belongs_to_many join table on eager includes. #4106 [jeremyevans0@gmail.com] +* Alias the has_and_belongs_to_many join table on eager includes. #4106 [Jeremy Evans] This statement would normally error because the projects_developers table is joined twice, and therefore joined_on would be ambiguous. Developer.find(:all, :include => {:projects => :developers}, :conditions => 'join_project_developers.joined_on IS NOT NULL') -* Oracle adapter gets some love #4230 [schoenm@earthlink.net] +* Oracle adapter gets some love #4230 [Michael Schoen] * Changes :text to CLOB rather than BLOB [Moses Hohman] * Fixes an issue with nil numeric length/scales (several) @@ -1911,7 +1911,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] has_many :attachments, :as => :attachable, :dependent => :delete_all end -* Nicer error message on has_many :through when :through reflection can not be found. #4042 [court3nay@gmail.com] +* Nicer error message on has_many :through when :through reflection can not be found. #4042 [court3nay] * Upgrade to Transaction::Simple 1.3 [Jamis Buck] @@ -1923,7 +1923,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Dynamically set allow_concurrency. #4044 [Stefan Kaes] -* Added Base#to_xml that'll turn the current record into a XML representation [DHH]. Example: +* Added Base#to_xml that'll turn the current record into a XML representation [David Heinemeier Hansson]. Example: topic.to_xml @@ -2058,9 +2058,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * CHANGED DEFAULT: set ActiveRecord::Base.allow_concurrency to false. Most AR usage is in single-threaded applications. [Jeremy Kemper] -* Renamed the "oci" adapter to "oracle", but kept the old name as an alias #4017 [schoenm@earthlink.net] +* Renamed the "oci" adapter to "oracle", but kept the old name as an alias #4017 [Michael Schoen] -* Fixed that Base.save should always return false if the save didn't succeed, including if it has halted by before_save's #1861, #2477 [DHH] +* Fixed that Base.save should always return false if the save didn't succeed, including if it has halted by before_save's #1861, #2477 [David Heinemeier Hansson] * Speed up class -> connection caching and stale connection verification. #3979 [Stefan Kaes] @@ -2068,7 +2068,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Added that fixtures to placed in subdirectories of the main fixture files are also loaded #3937 [dblack@wobblini.net] -* Define attribute query methods to avoid method_missing calls. #3677 [jonathan@bluewire.net.nz] +* Define attribute query methods to avoid method_missing calls. #3677 [Jonathan Viney] * ActiveRecord::Base.remove_connection explicitly closes database connections and doesn't corrupt the connection cache. Introducing the disconnect! instance method for the PostgreSQL, MySQL, and SQL Server adapters; implementations for the others are welcome. #3591 [Simon Stapleton, Tom Ward] @@ -2092,7 +2092,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Fixed validates_length_of to work on UTF-8 strings by using characters instead of bytes #3699 [Masao Mutoh] -* Fixed that reflections would bleed across class boundaries in single-table inheritance setups #3796 [lars@pind.com] +* Fixed that reflections would bleed across class boundaries in single-table inheritance setups #3796 [Lars Pind] * Added calculations: Base.count, Base.average, Base.sum, Base.minimum, Base.maxmium, and the generic Base.calculate. All can be used with :group and :having. Calculations and statitics need no longer require custom SQL. #3958 [Rick Olson]. Examples: @@ -2101,7 +2101,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] Person.maximum :age Person.sum :salary, :group => :last_name -* Renamed Errors#count to Errors#size but kept an alias for the old name (and included an alias for length too) #3920 [contact@lukeredpath.co.uk] +* Renamed Errors#count to Errors#size but kept an alias for the old name (and included an alias for length too) #3920 [Luke Redpath] * Reflections don't attempt to resolve module nesting of association classes. Simplify type computation. [Jeremy Kemper] @@ -2109,7 +2109,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Fixed that the schema_info table used by ActiveRecord::Schema.define should respect table pre- and suffixes #3834 [rubyonrails@atyp.de] -* Added :select option to Base.count that'll allow you to select something else than * to be counted on. Especially important for count queries using DISTINCT #3839 [skaes] +* Added :select option to Base.count that'll allow you to select something else than * to be counted on. Especially important for count queries using DISTINCT #3839 [Stefan Kaes] * Correct syntax error in mysql DDL, and make AAACreateTablesTest run first [Bob Silva] @@ -2125,19 +2125,19 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Fix problems with count when used with :include [Jeremy Hopple and Kevin Clark] -* ActiveRecord::RecordInvalid now states which validations failed in its default error message [Tobias Luetke] +* ActiveRecord::RecordInvalid now states which validations failed in its default error message [Tobias Lütke] -* Using AssociationCollection#build with arrays of hashes should call build, not create [DHH] +* Using AssociationCollection#build with arrays of hashes should call build, not create [David Heinemeier Hansson] * Remove definition of reloadable? from ActiveRecord::Base to make way for new Reloadable code. [Nicholas Seckar] * Fixed schema handling for DB2 adapter that didn't work: an initial schema could be set, but it wasn't used when getting tables and indexes #3678 [Maik Schmidt] -* Support the :column option for remove_index with the PostgreSQL adapter. #3661 [shugo@ruby-lang.org] +* Support the :column option for remove_index with the PostgreSQL adapter. #3661 [Shugo Maeda] * Add documentation for add_index and remove_index. #3600 [Manfred Stienstra <m.stienstra@fngtps.com>] -* If the OCI library is not available, raise an exception indicating as much. #3593 [schoenm@earthlink.net] +* If the OCI library is not available, raise an exception indicating as much. #3593 [Michael Schoen] * Add explicit :order in finder tests as postgresql orders results differently by default. #3577. [Rick Olson] @@ -2145,7 +2145,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Show a meaningful error when the DB2 adapter cannot be loaded due to missing dependencies. [Nicholas Seckar] -* Make .count work for has_many associations with multi line finder sql [schoenm@earthlink.net] +* Make .count work for has_many associations with multi line finder sql [Michael Schoen] * Add AR::Base.base_class for querying the ancestor AR::Base subclass [Jamis Buck] @@ -2153,13 +2153,13 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Don't hardcode 'id' in acts as list. [ror@philippeapril.com] -* Fix date errors for SQLServer in association tests. #3406 [kevin.clark@gmal.com] +* Fix date errors for SQLServer in association tests. #3406 [Kevin Clark] * Escape database name in MySQL adapter when creating and dropping databases. #3409 [anna@wota.jp] * Disambiguate table names for columns in validates_uniquness_of's WHERE clause. #3423 [alex.borovsky@gmail.com] -* .with_scope imposed create parameters now bypass attr_protected [Tobias Luetke] +* .with_scope imposed create parameters now bypass attr_protected [Tobias Lütke] * Don't raise an exception when there are more keys than there are named bind variables when sanitizing conditions. [Marcel Molina Jr.] @@ -2167,25 +2167,25 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Sanitize scoped conditions. [Marcel Molina Jr.] -* Added option to Base.reflection_of_all_associations to specify a specific association to scope the call. For example Base.reflection_of_all_associations(:has_many) [DHH] +* Added option to Base.reflection_of_all_associations to specify a specific association to scope the call. For example Base.reflection_of_all_associations(:has_many) [David Heinemeier Hansson] -* Added ActiveRecord::SchemaDumper.ignore_tables which tells SchemaDumper which tables to ignore. Useful for tables with funky column like the ones required for tsearch2. [TobiasLuetke] +* Added ActiveRecord::SchemaDumper.ignore_tables which tells SchemaDumper which tables to ignore. Useful for tables with funky column like the ones required for tsearch2. [Tobias Lütke] -* SchemaDumper now doesn't fail anymore when there are unknown column types in the schema. Instead the table is ignored and a Comment is left in the schema.rb. [TobiasLuetke] +* SchemaDumper now doesn't fail anymore when there are unknown column types in the schema. Instead the table is ignored and a Comment is left in the schema.rb. [Tobias Lütke] * Fixed that saving a model with multiple habtm associations would only save the first one. #3244 [yanowitz-rubyonrails@quantumfoam.org, Florian Weber] * Fix change_column to work with PostgreSQL 7.x and 8.x. #3141 [wejn@box.cz, Rick Olson, Scott Barron] -* removed :piggyback in favor of just allowing :select on :through associations. [Tobias Luetke] +* removed :piggyback in favor of just allowing :select on :through associations. [Tobias Lütke] -* made method missing delegation to class methods on relation target work on :through associations. [Tobias Luetke] +* made method missing delegation to class methods on relation target work on :through associations. [Tobias Lütke] -* made .find() work on :through relations. [Tobias Luetke] +* made .find() work on :through relations. [Tobias Lütke] * Fix typo in association docs. #3296. [Blair Zajac] -* Fixed :through relations when using STI inherited classes would use the inherited class's name as foreign key on the join model [Tobias Luetke] +* Fixed :through relations when using STI inherited classes would use the inherited class's name as foreign key on the join model [Tobias Lütke] *1.13.2* (December 13th, 2005) @@ -2193,7 +2193,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * MySQL: allow encoding option for mysql.rb driver. [Jeremy Kemper] -* Added option inheritance for find calls on has_and_belongs_to_many and has_many assosociations [DHH]. Example: +* Added option inheritance for find calls on has_and_belongs_to_many and has_many assosociations [David Heinemeier Hansson]. Example: class Post has_many :recent_comments, :class_name => "Comment", :limit => 10, :include => :author @@ -2203,7 +2203,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] post.recent_comments.find(:all, :limit => nil) # Uses no limit but include authors post.recent_comments.find(:all, :limit => nil, :include => nil) # Uses no limit and doesn't include authors -* Added option to specify :group, :limit, :offset, and :select options from find on has_and_belongs_to_many and has_many assosociations [DHH] +* Added option to specify :group, :limit, :offset, and :select options from find on has_and_belongs_to_many and has_many assosociations [David Heinemeier Hansson] * MySQL: fixes for the bundled mysql.rb driver. #3160 [Justin Forder] @@ -2231,9 +2231,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * MySQL: work around ruby-mysql/mysql-ruby inconsistency with mysql.stat. Eliminate usage of mysql.ping because it doesn't guarantee reconnect. Explicitly close and reopen the connection instead. [Jeremy Kemper] -* Added preliminary support for polymorphic associations [DHH] +* Added preliminary support for polymorphic associations [David Heinemeier Hansson] -* Added preliminary support for join models [DHH] +* Added preliminary support for join models [David Heinemeier Hansson] * Allow validate_uniqueness_of to be scoped by more than just one column. #1559. [jeremy@jthopple.com, Marcel Molina Jr.] @@ -2259,7 +2259,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Add tasks to create, drop and rebuild the MySQL and PostgreSQL test databases. [Marcel Molina Jr.] -* Correct boolean handling in generated reader methods. #2945 [don.park@gmail.com, Stefan Kaes] +* Correct boolean handling in generated reader methods. #2945 [Don Park, Stefan Kaes] * Don't generate read methods for columns whose names are not valid ruby method names. #2946 [Stefan Kaes] @@ -2307,7 +2307,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Fix sqlite adaptor's detection of missing dbfile or database declaration. [Nicholas Seckar] -* Fixed acts_as_list for definitions without an explicit :order #2803 [jonathan@bluewire.net.nz] +* Fixed acts_as_list for definitions without an explicit :order #2803 [Jonathan Viney] * Upgrade bundled ruby-mysql 0.2.4 with mysql411 shim (see #440) to ruby-mysql 0.2.6 with a patchset for 4.1 protocol support. Local change [301] is now a part of the main driver; reapplied local change [2182]. Removed GC.start from Result.free. [tommy@tmtm.org, akuroda@gmail.com, Doug Fales <doug.fales@gmail.com>, Jeremy Kemper] @@ -2326,7 +2326,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Fixed faulty regex in get_table_name method (SQLServerAdapter) #2639 [Ryan Tomayko] -* Added :include as an option for association declarations [DHH]. Example: +* Added :include as an option for association declarations [David Heinemeier Hansson]. Example: has_many :posts, :include => [ :author, :comments ] @@ -2341,7 +2341,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Fixed that SQL Server should ignore :size declarations on anything but integer and string in the agnostic schema representation #2756 [Ryan Tomayko] -* Added constrain scoping for creates using a hash of attributes bound to the :creation key [DHH]. Example: +* Added constrain scoping for creates using a hash of attributes bound to the :creation key [David Heinemeier Hansson]. Example: Comment.constrain(:creation => { :post_id => 5 }) do # Associated with :post_id @@ -2353,7 +2353,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] # If the tag doesn't exist, a new one is created that's associated with the person person.tags.find_or_create_by_name("Summer") -* Added find_or_create_by_X as a second type of dynamic finder that'll create the record if it doesn't already exist [DHH]. Example: +* Added find_or_create_by_X as a second type of dynamic finder that'll create the record if it doesn't already exist [David Heinemeier Hansson]. Example: # No 'Summer' tag exists Tag.find_or_create_by_name("Summer") # equal to Tag.create(:name => "Summer") @@ -2361,7 +2361,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] # Now the 'Summer' tag does exist Tag.find_or_create_by_name("Summer") # equal to Tag.find_by_name("Summer") -* Added extension capabilities to has_many and has_and_belongs_to_many proxies [DHH]. Example: +* Added extension capabilities to has_many and has_and_belongs_to_many proxies [David Heinemeier Hansson]. Example: class Account < ActiveRecord::Base has_many :people do @@ -2380,9 +2380,9 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] Note that the anoymous module must be declared using brackets, not do/end (due to order of evaluation). -* Omit internal dtproperties table from SQLServer table list. #2729 [rtomayko@gmail.com] +* Omit internal dtproperties table from SQLServer table list. #2729 [Ryan Tomayko] -* Quote column names in generated SQL. #2728 [rtomayko@gmail.com] +* Quote column names in generated SQL. #2728 [Ryan Tomayko] * Correct the pure-Ruby MySQL 4.1.1 shim's version test. #2718 [Jeremy Kemper] @@ -2396,7 +2396,7 @@ during calendar reform. #7649, #7724 [fedot, Geoff Buesing] * Worked around that connection can't be reset if allow_concurrency is off. #2648 [Michael Schoen <schoenm@earthlink.net>] -* Fixed SQL Server adapter to pass even more tests and do even better #2634 [rtomayko@gmail.com] +* Fixed SQL Server adapter to pass even more tests and do even better #2634 [Ryan Tomayko] * Fixed SQL Server adapter so it honors options[:conditions] when applying :limits #1978 [Tom Ward] @@ -2409,18 +2409,18 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Added :offset and :limit to the kinds of options that Base.constrain can use #2466 [duane.johnson@gmail.com] -* Fixed handling of nil number columns on Oracle and cleaned up tests for Oracle in general #2555 [schoenm@earthlink.net] +* Fixed handling of nil number columns on Oracle and cleaned up tests for Oracle in general #2555 [Michael Schoen] * Added quoted_true and quoted_false methods and tables to db2_adapter and cleaned up tests for DB2 #2493, #2624 [maik schmidt] *1.12.2* (October 26th, 2005) -* Allow symbols to rename columns when using SQLite adapter. #2531 [kevin.clark@gmail.com] +* Allow symbols to rename columns when using SQLite adapter. #2531 [Kevin Clark] * Map Active Record time to SQL TIME. #2575, #2576 [Robby Russell <robby@planetargon.com>] -* Clarify semantics of ActiveRecord::Base#respond_to? #2560 [skaes@web.de] +* Clarify semantics of ActiveRecord::Base#respond_to? #2560 [Stefan Kaes] * Fixed Association#clear for associations which have not yet been accessed. #2524 [Patrick Lenz <patrick@lenz.sh>] @@ -2474,25 +2474,25 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Add test coverage for content_columns. #2432. [coffee2code] -* Speed up for unthreaded environments. #2431. [skaes@web.de] +* Speed up for unthreaded environments. #2431. [Stefan Kaes] -* Optimization for Mysql selects using mysql-ruby extension greater than 2.6.3. #2426. [skaes@web.de] +* Optimization for Mysql selects using mysql-ruby extension greater than 2.6.3. #2426. [Stefan Kaes] -* Speed up the setting of table_name. #2428. [skaes@web.de] +* Speed up the setting of table_name. #2428. [Stefan Kaes] -* Optimize instantiation of STI subclass records. In partial fullfilment of #1236. [skaes@web.de] +* Optimize instantiation of STI subclass records. In partial fullfilment of #1236. [Stefan Kaes] * Fix typo of 'constrains' to 'contraints'. #2069. [Michael Schuerig <michael@schuerig.de>] -* Optimization refactoring for add_limit_offset!. In partial fullfilment of #1236. [skaes@web.de] +* Optimization refactoring for add_limit_offset!. In partial fullfilment of #1236. [Stefan Kaes] * Add ability to get all siblings, including the current child, with acts_as_tree. Recloses #2140. [Michael Schuerig <michael@schuerig.de>] -* Add geometric type for postgresql adapter. #2233 [akaspick@gmail.com] +* Add geometric type for postgresql adapter. #2233 [Andrew Kaspick] -* Add option (true by default) to generate reader methods for each attribute of a record to avoid the overhead of calling method missing. In partial fullfilment of #1236. [skaes@web.de] +* Add option (true by default) to generate reader methods for each attribute of a record to avoid the overhead of calling method missing. In partial fullfilment of #1236. [Stefan Kaes] -* Add convenience predicate methods on Column class. In partial fullfilment of #1236. [skaes@web.de] +* Add convenience predicate methods on Column class. In partial fullfilment of #1236. [Stefan Kaes] * Raise errors when invalid hash keys are passed to ActiveRecord::Base.find. #2363 [Chad Fowler <chad@chadfowler.com>, Nicholas Seckar] @@ -2517,7 +2517,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Make update_attribute use the same writer method that update_attributes uses. #2237 [trevor@protocool.com] -* Make migrations honor table name prefixes and suffixes. #2298 [Jakob S, Marcel Molina] +* Make migrations honor table name prefixes and suffixes. #2298 [Jakob Skjerning, Marcel Molina Jr.] * Correct and optimize PostgreSQL bytea escaping. #1745, #1837 [dave@cherryville.org, ken@miriamtech.com, bellis@deepthought.org] @@ -2525,7 +2525,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Standardize the interpretation of boolean columns in the Mysql and Sqlite adapters. (Use MysqlAdapter.emulate_booleans = false to disable this behavior) -* Added new symbol-driven approach to activating observers with Base#observers= [DHH]. Example: +* Added new symbol-driven approach to activating observers with Base#observers= [David Heinemeier Hansson]. Example: ActiveRecord::Base.observers = :cacher, :garbage_collector @@ -2541,19 +2541,19 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed that the create_x method from belongs_to wouldn't save the association properly #2042 [Florian Weber] -* Fixed saving a record with two unsaved belongs_to associations pointing to the same object #2023 [Tobias Luetke] +* Fixed saving a record with two unsaved belongs_to associations pointing to the same object #2023 [Tobias Lütke] * Improved migrations' behavior when the schema_info table is empty. [Nicholas Seckar] * Fixed that Observers didn't observe sub-classes #627 [Florian Weber] -* Fix eager loading error messages, allow :include to specify tables using strings or symbols. Closes #2222 [Marcel Molina] +* Fix eager loading error messages, allow :include to specify tables using strings or symbols. Closes #2222 [Marcel Molina Jr.] * Added check for RAILS_CONNECTION_ADAPTERS on startup and only load the connection adapters specified within if its present (available in Rails through config.connection_adapters using the new config) #1958 [skae] * Fixed various problems with has_and_belongs_to_many when using customer finder_sql #2094 [Florian Weber] -* Added better exception error when unknown column types are used with migrations #1814 [fbeausoleil@ftml.net] +* Added better exception error when unknown column types are used with migrations #1814 [François Beausoleil] * Fixed "connection lost" issue with the bundled Ruby/MySQL driver (would kill the app after 8 hours of inactivity) #2163, #428 [kajism@yahoo.com] @@ -2569,13 +2569,13 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Make sure the schema_info table is created before querying the current version #1903 -* Fixtures ignore table name prefix and suffix #1987 [Jakob S] +* Fixtures ignore table name prefix and suffix #1987 [Jakob Skjerning] -* Add documentation for index_type argument to add_index method for migrations #2005 [blaine@odeo.com] +* Add documentation for index_type argument to add_index method for migrations #2005 [Blaine] * Modify read_attribute to allow a symbol argument #2024 [Ken Kunz] -* Make destroy return self #1913 [sebastian.kanthak@muehlheim.de] +* Make destroy return self #1913 [Sebastian Kanthak] * Fix typo in validations documentation #1938 [court3nay] @@ -2597,7 +2597,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed the handling of multiple blob columns in Oracle if one or more of them are null #1798 -* Added support for calling constrained class methods on has_many and has_and_belongs_to_many collections #1764 [Tobias Luetke] +* Added support for calling constrained class methods on has_many and has_and_belongs_to_many collections #1764 [Tobias Lütke] class Comment < AR:B def self.search(q) @@ -2629,19 +2629,19 @@ in effect. Added :readonly finder constraint. Calling an association collectio *1.11.1* (11 July, 2005) -* Added support for limit and offset with eager loading of has_one and belongs_to associations. Using the options with has_many and has_and_belongs_to_many associations will now raise an ActiveRecord::ConfigurationError #1692 [Rick Olsen] +* Added support for limit and offset with eager loading of has_one and belongs_to associations. Using the options with has_many and has_and_belongs_to_many associations will now raise an ActiveRecord::ConfigurationError #1692 [Rick Olson] * Fixed that assume_bottom_position (in acts_as_list) could be called on items already last in the list and they would move one position away from the list #1648 [tyler@kianta.com] * Added ActiveRecord::Base.threaded_connections flag to turn off 1-connection per thread (required for thread safety). By default it's on, but WEBrick in Rails need it off #1685 [Sam Stephenson] -* Correct reflected table name for singular associations. #1688 [court3nay@gmail.com] +* Correct reflected table name for singular associations. #1688 [court3nay] * Fixed optimistic locking with SQL Server #1660 [tom@popdog.net] * Added ActiveRecord::Migrator.migrate that can figure out whether to go up or down based on the target version and the current -* Added better error message for "packets out of order" #1630 [courtenay] +* Added better error message for "packets out of order" #1630 [court3nay] * Fixed first run of "rake migrate" on PostgreSQL by not expecting a return value on the id #1640 @@ -2652,7 +2652,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Changed logging of SQL statements to use the DEBUG level instead of INFO -* Added new Migrations framework for describing schema transformations in a way that can be easily applied across multiple databases #1604 [Tobias Luetke] See documentation under ActiveRecord::Migration and the additional support in the Rails rakefile/generator. +* Added new Migrations framework for describing schema transformations in a way that can be easily applied across multiple databases #1604 [Tobias Lütke] See documentation under ActiveRecord::Migration and the additional support in the Rails rakefile/generator. * Added callback hooks to association collections #1549 [Florian Weber]. Example: @@ -2675,13 +2675,13 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Speed up ActiveRecord#method_missing for the common case (read_attribute). -* Only notify observers on after_find and after_initialize if these methods are defined on the model. #1235 [skaes@web.de] +* Only notify observers on after_find and after_initialize if these methods are defined on the model. #1235 [Stefan Kaes] * Fixed that single-table inheritance sub-classes couldn't be used to limit the result set with eager loading #1215 [Chris McGrath] * Fixed validates_numericality_of to work with overrided getter-method when :allow_nil is on #1316 [raidel@onemail.at] -* Added roots, root, and siblings to the batch of methods added by acts_as_tree #1541 [michael@schuerig.de] +* Added roots, root, and siblings to the batch of methods added by acts_as_tree #1541 [Michael Schuerig] * Added support for limit/offset with the MS SQL Server driver so that pagination will now work #1569 [DeLynn Berry] @@ -2703,7 +2703,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio :conditions => 'project_id=1' ) -* Fixed that validations didn't respecting custom setting for too_short, too_long messages #1437 [Marcel Molina] +* Fixed that validations didn't respecting custom setting for too_short, too_long messages #1437 [Marcel Molina Jr.] * Fixed that clear_association_cache doesn't delete new associations on new records (so you can safely place new records in the session with Action Pack without having new associations wiped) #1494 [cluon] @@ -2730,7 +2730,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Corrected typo in find SQL for has_and_belongs_to_many. #1312 [ben@bensinclair.com] -* Fixed sanitized conditions for has_many finder method. #1281 [jackc@hylesanderson.com, pragdave, Tobias Luetke] +* Fixed sanitized conditions for has_many finder method. #1281 [jackc@hylesanderson.com, pragdave, Tobias Lütke] * Comprehensive PostgreSQL schema support. Use the optional schema_search_path directive in database.yml to give a comma-separated list of schemas to search for your tables. This allows you, for example, to have tables in a shared schema without having to use a custom table name. See http://www.postgresql.org/docs/8.0/interactive/ddl-schemas.html to learn more. #827 [dave@cherryville.org] @@ -2788,15 +2788,15 @@ in effect. Added :readonly finder constraint. Calling an association collectio # SELECT * FROM topics WHERE title IN ('First', 'Second') Topic.find_all_by_title(["First", "Second"]) -* Added compatibility with camelCase column names for dynamic finders #533 [Dee.Zsombor] +* Added compatibility with camelCase column names for dynamic finders #533 [Dee Zsombor] -* Fixed extraneous comma in count() function that made it not work with joins #1156 [jarkko/Dee.Zsombor] +* Fixed extraneous comma in count() function that made it not work with joins #1156 [Jarkko Laine/Dee Zsombor] * Fixed incompatibility with Base#find with an array of ids that would fail when using eager loading #1186 [Alisdair McDiarmid] * Fixed that validate_length_of lost :on option when :within was specified #1195 [jhosteny@mac.com] -* Added encoding and min_messages options for PostgreSQL #1205 [shugo]. Configuration example: +* Added encoding and min_messages options for PostgreSQL #1205 [Shugo Maeda]. Configuration example: development: adapter: postgresql @@ -2854,7 +2854,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio a single query. A good use case for this is a threaded post system, where you want to display every reply to a comment without multiple selects. -* Added Base.save! that attempts to save the record just like Base.save but will raise a RecordInvalid exception instead of returning false if the record is not valid [After much pestering from Dave Thomas] +* Added Base.save! that attempts to save the record just like Base.save but will raise a RecordInvalid exception instead of returning false if the record is not valid [Dave Thomas] * Fixed PostgreSQL usage of fixtures with regards to public schemas and table names with dots #962 [gnuman1@gmail.com] @@ -2884,7 +2884,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed counter_sql when no records exist in database for PostgreSQL (would give error, not 0) #1039 [Caleb Tennis] -* Fixed that benchmarking times for rendering included db runtimes #987 [skaes@web.de] +* Fixed that benchmarking times for rendering included db runtimes #987 [Stefan Kaes] * Fixed boolean queries for t/f fields in PostgreSQL #995 [dave@cherryville.org] @@ -2892,9 +2892,9 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed auto-stamping of dates (created_on/updated_on) for PostgreSQL #985 [dave@cherryville.org] -* Fixed Base.silence/benchmark to only log if a logger has been configured #986 [skaes@web.de] +* Fixed Base.silence/benchmark to only log if a logger has been configured #986 [Stefan Kaes] -* Added a join parameter as the third argument to Base.find_first and as the second to Base.count #426, #988 [skaes@web.de] +* Added a join parameter as the third argument to Base.find_first and as the second to Base.count #426, #988 [Stefan Kaes] * Fixed bug in Base#hash method that would treat records with the same string-based id as different [Dave Thomas] @@ -2980,7 +2980,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio account.save # => CC with id = 12 is destroyed -* Added validates_numericality_of #716 [skanthak/c.r.mcgrath]. Docuemntation: +* Added validates_numericality_of #716 [Sebastian Kanthak/Chris McGrath]. Docuemntation: Validates whether the value of the specified attribute is numeric by trying to convert it to a float with Kernel.Float (if <tt>integer</tt> is false) or applying it to the regular expression @@ -3050,7 +3050,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio 4. Added logic to the simplified_type method that allows the database to specify the scale of float data. 5. Adjusted the quote_column_name to account for the fact that MS SQL is bothered by a forward slash in the data string. -* Fixed that the dynamic finder like find_all_by_something_boolean(false) didn't work #649 [lmarlow@yahoo.com] +* Fixed that the dynamic finder like find_all_by_something_boolean(false) didn't work #649 [lmarlow] * Added validates_each that validates each specified attribute against a block #610 [Jeremy Kemper]. Example: @@ -3233,17 +3233,17 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed that that multiparameter assignment doesn't work with aggregations (closes #4620) [Lars Pind] -* Enable Limit/Offset in Calculations (closes #4558) [lmarlow@yahoo.com] +* Enable Limit/Offset in Calculations (closes #4558) [lmarlow] -* Fixed that loading including associations returns all results if Load IDs For Limited Eager Loading returns none (closes #4528) [Rick] +* Fixed that loading including associations returns all results if Load IDs For Limited Eager Loading returns none (closes #4528) [Rick Olson] * Fixed HasManyAssociation#find bugs when :finder_sql is set #4600 [lagroue@free.fr] -* Allow AR::Base#respond_to? to behave when @attributes is nil [zenspider] +* Allow AR::Base#respond_to? to behave when @attributes is nil [Ryan Davis] -* Support eager includes when going through a polymorphic has_many association. [Rick] +* Support eager includes when going through a polymorphic has_many association. [Rick Olson] -* Added support for eagerly including polymorphic has_one associations. (closes #4525) [Rick] +* Added support for eagerly including polymorphic has_one associations. (closes #4525) [Rick Olson] class Post < ActiveRecord::Base has_one :tagging, :as => :taggable @@ -3251,9 +3251,9 @@ in effect. Added :readonly finder constraint. Calling an association collectio Post.find :all, :include => :tagging -* Added descriptive error messages for invalid has_many :through associations: going through :has_one or :has_and_belongs_to_many [Rick] +* Added descriptive error messages for invalid has_many :through associations: going through :has_one or :has_and_belongs_to_many [Rick Olson] -* Added support for going through a polymorphic has_many association: (closes #4401) [Rick] +* Added support for going through a polymorphic has_many association: (closes #4401) [Rick Olson] class PhotoCollection < ActiveRecord::Base has_many :photos, :as => :photographic @@ -3271,36 +3271,36 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Changed those private ActiveRecord methods to take optional third argument :auto instead of nil for performance optimizations. (closes #4456) [Stefan] -* Private ActiveRecord methods add_limit!, add_joins!, and add_conditions! take an OPTIONAL third argument 'scope' (closes #4456) [Rick] +* Private ActiveRecord methods add_limit!, add_joins!, and add_conditions! take an OPTIONAL third argument 'scope' (closes #4456) [Rick Olson] -* DEPRECATED: Using additional attributes on has_and_belongs_to_many associations. Instead upgrade your association to be a real join model [DHH] +* DEPRECATED: Using additional attributes on has_and_belongs_to_many associations. Instead upgrade your association to be a real join model [David Heinemeier Hansson] -* Fixed that records returned from has_and_belongs_to_many associations with additional attributes should be marked as read only (fixes #4512) [DHH] +* Fixed that records returned from has_and_belongs_to_many associations with additional attributes should be marked as read only (fixes #4512) [David Heinemeier Hansson] * Do not implicitly mark recordss of has_many :through as readonly but do mark habtm records as readonly (eventually only on join tables without rich attributes). [Marcel Mollina Jr.] -* Fixed broken OCIAdapter #4457 [schoenm@earthlink.net] +* Fixed broken OCIAdapter #4457 [Michael Schoen] *1.14.0* (March 27th, 2006) * Replace 'rescue Object' with a finer grained rescue. Closes #4431. [Nicholas Seckar] -* Fixed eager loading so that an aliased table cannot clash with a has_and_belongs_to_many join table [Rick] +* Fixed eager loading so that an aliased table cannot clash with a has_and_belongs_to_many join table [Rick Olson] * Add support for :include to with_scope [andrew@redlinesoftware.com] -* Support the use of public synonyms with the Oracle adapter; required ruby-oci8 v0.1.14 #4390 [schoenm@earthlink.net] +* Support the use of public synonyms with the Oracle adapter; required ruby-oci8 v0.1.14 #4390 [Michael Schoen] * Change periods (.) in table aliases to _'s. Closes #4251 [jeff@ministrycentered.com] -* Changed has_and_belongs_to_many join to INNER JOIN for Mysql 3.23.x. Closes #4348 [Rick] +* Changed has_and_belongs_to_many join to INNER JOIN for Mysql 3.23.x. Closes #4348 [Rick Olson] -* Fixed issue that kept :select options from being scoped [Rick] +* Fixed issue that kept :select options from being scoped [Rick Olson] -* Fixed db_schema_import when binary types are present #3101 [DHH] +* Fixed db_schema_import when binary types are present #3101 [David Heinemeier Hansson] -* Fixed that MySQL enums should always be returned as strings #3501 [DHH] +* Fixed that MySQL enums should always be returned as strings #3501 [David Heinemeier Hansson] * Change has_many :through to use the :source option to specify the source association. :class_name is now ignored. [Rick Olson] @@ -3331,13 +3331,13 @@ in effect. Added :readonly finder constraint. Calling an association collectio end end -* Fixed that schema changes while the database was open would break any connections to a SQLite database (now we reconnect if that error is throw) [DHH] +* Fixed that schema changes while the database was open would break any connections to a SQLite database (now we reconnect if that error is throw) [David Heinemeier Hansson] -* Don't classify the has_one class when eager loading, it is already singular. Add tests. (closes #4117) [jonathan@bluewire.net.nz] +* Don't classify the has_one class when eager loading, it is already singular. Add tests. (closes #4117) [Jonathan Viney] * Quit ignoring default :include options in has_many :through calls [Mark James] -* Allow has_many :through associations to find the source association by setting a custom class (closes #4307) [jonathan@bluewire.net.nz] +* Allow has_many :through associations to find the source association by setting a custom class (closes #4307) [Jonathan Viney] * Eager Loading support added for has_many :through => :has_many associations (see below). [Rick Olson] @@ -3357,13 +3357,13 @@ in effect. Added :readonly finder constraint. Calling an association collectio belongs_to :client end -* Raise error when trying to select many polymorphic objects with has_many :through or :include (closes #4226) [josh@hasmanythrough.com] +* Raise error when trying to select many polymorphic objects with has_many :through or :include (closes #4226) [Josh Susser] -* Fixed has_many :through to include :conditions set on the :through association. closes #4020 [jonathan@bluewire.net.nz] +* Fixed has_many :through to include :conditions set on the :through association. closes #4020 [Jonathan Viney] -* Fix that has_many :through honors the foreign key set by the belongs_to association in the join model (closes #4259) [andylien@gmail.com / Rick] +* Fix that has_many :through honors the foreign key set by the belongs_to association in the join model (closes #4259) [andylien@gmail.com / Rick Olson] -* SQL Server adapter gets some love #4298 [rtomayko@gmail.com] +* SQL Server adapter gets some love #4298 [Ryan Tomayko] * Added OpenBase database adapter that builds on top of the http://www.spice-of-life.net/ruby-openbase/ driver. All functionality except LIMIT/OFFSET is supported #3528 [derrickspell@cdmplus.com] @@ -3371,27 +3371,27 @@ in effect. Added :readonly finder constraint. Calling an association collectio Author.find(:all, :include => { :posts => :special_comments }, :order => 'special_comments.body') -* Add AbstractAdapter#table_alias_for to create table aliases according to the rules of the current adapter. [Rick] +* Add AbstractAdapter#table_alias_for to create table aliases according to the rules of the current adapter. [Rick Olson] -* Provide access to the underlying database connection through Adapter#raw_connection. Enables the use of db-specific methods without complicating the adapters. #2090 [Koz] +* Provide access to the underlying database connection through Adapter#raw_connection. Enables the use of db-specific methods without complicating the adapters. #2090 [Michael Koziarski] -* Remove broken attempts at handling columns with a default of 'now()' in the postgresql adapter. #2257 [Koz] +* Remove broken attempts at handling columns with a default of 'now()' in the postgresql adapter. #2257 [Michael Koziarski] -* Added connection#current_database that'll return of the current database (only works in MySQL, SQL Server, and Oracle so far -- please help implement for the rest of the adapters) #3663 [Tom ward] +* Added connection#current_database that'll return of the current database (only works in MySQL, SQL Server, and Oracle so far -- please help implement for the rest of the adapters) #3663 [Tom Ward] * Fixed that Migration#execute would have the table name prefix appended to its query #4110 [mark.imbriaco@pobox.com] * Make all tinyint(1) variants act like boolean in mysql (tinyint(1) unsigned, etc.) [Jamis Buck] -* Use association's :conditions when eager loading. [jeremyevans0@gmail.com] #4144 +* Use association's :conditions when eager loading. [Jeremy Evans] #4144 -* Alias the has_and_belongs_to_many join table on eager includes. #4106 [jeremyevans0@gmail.com] +* Alias the has_and_belongs_to_many join table on eager includes. #4106 [Jeremy Evans] This statement would normally error because the projects_developers table is joined twice, and therefore joined_on would be ambiguous. Developer.find(:all, :include => {:projects => :developers}, :conditions => 'join_project_developers.joined_on IS NOT NULL') -* Oracle adapter gets some love #4230 [schoenm@earthlink.net] +* Oracle adapter gets some love #4230 [Michael Schoen] * Changes :text to CLOB rather than BLOB [Moses Hohman] * Fixes an issue with nil numeric length/scales (several) @@ -3426,7 +3426,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio has_many :attachments, :as => :attachable, :dependent => :delete_all end -* Nicer error message on has_many :through when :through reflection can not be found. #4042 [court3nay@gmail.com] +* Nicer error message on has_many :through when :through reflection can not be found. #4042 [court3nay] * Upgrade to Transaction::Simple 1.3 [Jamis Buck] @@ -3438,7 +3438,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Dynamically set allow_concurrency. #4044 [Stefan Kaes] -* Added Base#to_xml that'll turn the current record into a XML representation [DHH]. Example: +* Added Base#to_xml that'll turn the current record into a XML representation [David Heinemeier Hansson]. Example: topic.to_xml @@ -3573,9 +3573,9 @@ in effect. Added :readonly finder constraint. Calling an association collectio * CHANGED DEFAULT: set ActiveRecord::Base.allow_concurrency to false. Most AR usage is in single-threaded applications. [Jeremy Kemper] -* Renamed the "oci" adapter to "oracle", but kept the old name as an alias #4017 [schoenm@earthlink.net] +* Renamed the "oci" adapter to "oracle", but kept the old name as an alias #4017 [Michael Schoen] -* Fixed that Base.save should always return false if the save didn't succeed, including if it has halted by before_save's #1861, #2477 [DHH] +* Fixed that Base.save should always return false if the save didn't succeed, including if it has halted by before_save's #1861, #2477 [David Heinemeier Hansson] * Speed up class -> connection caching and stale connection verification. #3979 [Stefan Kaes] @@ -3583,7 +3583,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Added that fixtures to placed in subdirectories of the main fixture files are also loaded #3937 [dblack@wobblini.net] -* Define attribute query methods to avoid method_missing calls. #3677 [jonathan@bluewire.net.nz] +* Define attribute query methods to avoid method_missing calls. #3677 [Jonathan Viney] * ActiveRecord::Base.remove_connection explicitly closes database connections and doesn't corrupt the connection cache. Introducing the disconnect! instance method for the PostgreSQL, MySQL, and SQL Server adapters; implementations for the others are welcome. #3591 [Simon Stapleton, Tom Ward] @@ -3607,7 +3607,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed validates_length_of to work on UTF-8 strings by using characters instead of bytes #3699 [Masao Mutoh] -* Fixed that reflections would bleed across class boundaries in single-table inheritance setups #3796 [lars@pind.com] +* Fixed that reflections would bleed across class boundaries in single-table inheritance setups #3796 [Lars Pind] * Added calculations: Base.count, Base.average, Base.sum, Base.minimum, Base.maxmium, and the generic Base.calculate. All can be used with :group and :having. Calculations and statitics need no longer require custom SQL. #3958 [Rick Olson]. Examples: @@ -3616,7 +3616,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio Person.maximum :age Person.sum :salary, :group => :last_name -* Renamed Errors#count to Errors#size but kept an alias for the old name (and included an alias for length too) #3920 [contact@lukeredpath.co.uk] +* Renamed Errors#count to Errors#size but kept an alias for the old name (and included an alias for length too) #3920 [Luke Redpath] * Reflections don't attempt to resolve module nesting of association classes. Simplify type computation. [Jeremy Kemper] @@ -3624,7 +3624,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed that the schema_info table used by ActiveRecord::Schema.define should respect table pre- and suffixes #3834 [rubyonrails@atyp.de] -* Added :select option to Base.count that'll allow you to select something else than * to be counted on. Especially important for count queries using DISTINCT #3839 [skaes] +* Added :select option to Base.count that'll allow you to select something else than * to be counted on. Especially important for count queries using DISTINCT #3839 [Stefan Kaes] * Correct syntax error in mysql DDL, and make AAACreateTablesTest run first [Bob Silva] @@ -3640,19 +3640,19 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fix problems with count when used with :include [Jeremy Hopple and Kevin Clark] -* ActiveRecord::RecordInvalid now states which validations failed in its default error message [Tobias Luetke] +* ActiveRecord::RecordInvalid now states which validations failed in its default error message [Tobias Lütke] -* Using AssociationCollection#build with arrays of hashes should call build, not create [DHH] +* Using AssociationCollection#build with arrays of hashes should call build, not create [David Heinemeier Hansson] * Remove definition of reloadable? from ActiveRecord::Base to make way for new Reloadable code. [Nicholas Seckar] * Fixed schema handling for DB2 adapter that didn't work: an initial schema could be set, but it wasn't used when getting tables and indexes #3678 [Maik Schmidt] -* Support the :column option for remove_index with the PostgreSQL adapter. #3661 [shugo@ruby-lang.org] +* Support the :column option for remove_index with the PostgreSQL adapter. #3661 [Shugo Maeda] * Add documentation for add_index and remove_index. #3600 [Manfred Stienstra <m.stienstra@fngtps.com>] -* If the OCI library is not available, raise an exception indicating as much. #3593 [schoenm@earthlink.net] +* If the OCI library is not available, raise an exception indicating as much. #3593 [Michael Schoen] * Add explicit :order in finder tests as postgresql orders results differently by default. #3577. [Rick Olson] @@ -3660,7 +3660,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Show a meaningful error when the DB2 adapter cannot be loaded due to missing dependencies. [Nicholas Seckar] -* Make .count work for has_many associations with multi line finder sql [schoenm@earthlink.net] +* Make .count work for has_many associations with multi line finder sql [Michael Schoen] * Add AR::Base.base_class for querying the ancestor AR::Base subclass [Jamis Buck] @@ -3668,13 +3668,13 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Don't hardcode 'id' in acts as list. [ror@philippeapril.com] -* Fix date errors for SQLServer in association tests. #3406 [kevin.clark@gmal.com] +* Fix date errors for SQLServer in association tests. #3406 [Kevin Clark] * Escape database name in MySQL adapter when creating and dropping databases. #3409 [anna@wota.jp] * Disambiguate table names for columns in validates_uniquness_of's WHERE clause. #3423 [alex.borovsky@gmail.com] -* .with_scope imposed create parameters now bypass attr_protected [Tobias Luetke] +* .with_scope imposed create parameters now bypass attr_protected [Tobias Lütke] * Don't raise an exception when there are more keys than there are named bind variables when sanitizing conditions. [Marcel Molina Jr.] @@ -3682,25 +3682,25 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Sanitize scoped conditions. [Marcel Molina Jr.] -* Added option to Base.reflection_of_all_associations to specify a specific association to scope the call. For example Base.reflection_of_all_associations(:has_many) [DHH] +* Added option to Base.reflection_of_all_associations to specify a specific association to scope the call. For example Base.reflection_of_all_associations(:has_many) [David Heinemeier Hansson] -* Added ActiveRecord::SchemaDumper.ignore_tables which tells SchemaDumper which tables to ignore. Useful for tables with funky column like the ones required for tsearch2. [TobiasLuetke] +* Added ActiveRecord::SchemaDumper.ignore_tables which tells SchemaDumper which tables to ignore. Useful for tables with funky column like the ones required for tsearch2. [Tobias Lütke] -* SchemaDumper now doesn't fail anymore when there are unknown column types in the schema. Instead the table is ignored and a Comment is left in the schema.rb. [TobiasLuetke] +* SchemaDumper now doesn't fail anymore when there are unknown column types in the schema. Instead the table is ignored and a Comment is left in the schema.rb. [Tobias Lütke] * Fixed that saving a model with multiple habtm associations would only save the first one. #3244 [yanowitz-rubyonrails@quantumfoam.org, Florian Weber] * Fix change_column to work with PostgreSQL 7.x and 8.x. #3141 [wejn@box.cz, Rick Olson, Scott Barron] -* removed :piggyback in favor of just allowing :select on :through associations. [Tobias Luetke] +* removed :piggyback in favor of just allowing :select on :through associations. [Tobias Lütke] -* made method missing delegation to class methods on relation target work on :through associations. [Tobias Luetke] +* made method missing delegation to class methods on relation target work on :through associations. [Tobias Lütke] -* made .find() work on :through relations. [Tobias Luetke] +* made .find() work on :through relations. [Tobias Lütke] * Fix typo in association docs. #3296. [Blair Zajac] -* Fixed :through relations when using STI inherited classes would use the inherited class's name as foreign key on the join model [Tobias Luetke] +* Fixed :through relations when using STI inherited classes would use the inherited class's name as foreign key on the join model [Tobias Lütke] *1.13.2* (December 13th, 2005) @@ -3708,7 +3708,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * MySQL: allow encoding option for mysql.rb driver. [Jeremy Kemper] -* Added option inheritance for find calls on has_and_belongs_to_many and has_many assosociations [DHH]. Example: +* Added option inheritance for find calls on has_and_belongs_to_many and has_many assosociations [David Heinemeier Hansson]. Example: class Post has_many :recent_comments, :class_name => "Comment", :limit => 10, :include => :author @@ -3718,7 +3718,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio post.recent_comments.find(:all, :limit => nil) # Uses no limit but include authors post.recent_comments.find(:all, :limit => nil, :include => nil) # Uses no limit and doesn't include authors -* Added option to specify :group, :limit, :offset, and :select options from find on has_and_belongs_to_many and has_many assosociations [DHH] +* Added option to specify :group, :limit, :offset, and :select options from find on has_and_belongs_to_many and has_many assosociations [David Heinemeier Hansson] * MySQL: fixes for the bundled mysql.rb driver. #3160 [Justin Forder] @@ -3736,7 +3736,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * MySQL: more robust test for nullified result hashes. #3124 [Stefan Kaes] -* Reloading an instance refreshes its aggregations as well as its associations. #3024 [François Beausolei] +* Reloading an instance refreshes its aggregations as well as its associations. #3024 [François Beausoleil] * Fixed that using :include together with :conditions array in Base.find would cause NoMethodError #2887 [Paul Hammmond] @@ -3746,9 +3746,9 @@ in effect. Added :readonly finder constraint. Calling an association collectio * MySQL: work around ruby-mysql/mysql-ruby inconsistency with mysql.stat. Eliminate usage of mysql.ping because it doesn't guarantee reconnect. Explicitly close and reopen the connection instead. [Jeremy Kemper] -* Added preliminary support for polymorphic associations [DHH] +* Added preliminary support for polymorphic associations [David Heinemeier Hansson] -* Added preliminary support for join models [DHH] +* Added preliminary support for join models [David Heinemeier Hansson] * Allow validate_uniqueness_of to be scoped by more than just one column. #1559. [jeremy@jthopple.com, Marcel Molina Jr.] @@ -3774,7 +3774,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Add tasks to create, drop and rebuild the MySQL and PostgreSQL test databases. [Marcel Molina Jr.] -* Correct boolean handling in generated reader methods. #2945 [don.park@gmail.com, Stefan Kaes] +* Correct boolean handling in generated reader methods. #2945 [Don Park, Stefan Kaes] * Don't generate read methods for columns whose names are not valid ruby method names. #2946 [Stefan Kaes] @@ -3822,7 +3822,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fix sqlite adaptor's detection of missing dbfile or database declaration. [Nicholas Seckar] -* Fixed acts_as_list for definitions without an explicit :order #2803 [jonathan@bluewire.net.nz] +* Fixed acts_as_list for definitions without an explicit :order #2803 [Jonathan Viney] * Upgrade bundled ruby-mysql 0.2.4 with mysql411 shim (see #440) to ruby-mysql 0.2.6 with a patchset for 4.1 protocol support. Local change [301] is now a part of the main driver; reapplied local change [2182]. Removed GC.start from Result.free. [tommy@tmtm.org, akuroda@gmail.com, Doug Fales <doug.fales@gmail.com>, Jeremy Kemper] @@ -3841,7 +3841,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed faulty regex in get_table_name method (SQLServerAdapter) #2639 [Ryan Tomayko] -* Added :include as an option for association declarations [DHH]. Example: +* Added :include as an option for association declarations [David Heinemeier Hansson]. Example: has_many :posts, :include => [ :author, :comments ] @@ -3856,7 +3856,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed that SQL Server should ignore :size declarations on anything but integer and string in the agnostic schema representation #2756 [Ryan Tomayko] -* Added constrain scoping for creates using a hash of attributes bound to the :creation key [DHH]. Example: +* Added constrain scoping for creates using a hash of attributes bound to the :creation key [David Heinemeier Hansson]. Example: Comment.constrain(:creation => { :post_id => 5 }) do # Associated with :post_id @@ -3868,7 +3868,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio # If the tag doesn't exist, a new one is created that's associated with the person person.tags.find_or_create_by_name("Summer") -* Added find_or_create_by_X as a second type of dynamic finder that'll create the record if it doesn't already exist [DHH]. Example: +* Added find_or_create_by_X as a second type of dynamic finder that'll create the record if it doesn't already exist [David Heinemeier Hansson]. Example: # No 'Summer' tag exists Tag.find_or_create_by_name("Summer") # equal to Tag.create(:name => "Summer") @@ -3876,7 +3876,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio # Now the 'Summer' tag does exist Tag.find_or_create_by_name("Summer") # equal to Tag.find_by_name("Summer") -* Added extension capabilities to has_many and has_and_belongs_to_many proxies [DHH]. Example: +* Added extension capabilities to has_many and has_and_belongs_to_many proxies [David Heinemeier Hansson]. Example: class Account < ActiveRecord::Base has_many :people do @@ -3895,9 +3895,9 @@ in effect. Added :readonly finder constraint. Calling an association collectio Note that the anoymous module must be declared using brackets, not do/end (due to order of evaluation). -* Omit internal dtproperties table from SQLServer table list. #2729 [rtomayko@gmail.com] +* Omit internal dtproperties table from SQLServer table list. #2729 [Ryan Tomayko] -* Quote column names in generated SQL. #2728 [rtomayko@gmail.com] +* Quote column names in generated SQL. #2728 [Ryan Tomayko] * Correct the pure-Ruby MySQL 4.1.1 shim's version test. #2718 [Jeremy Kemper] @@ -3911,7 +3911,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Worked around that connection can't be reset if allow_concurrency is off. #2648 [Michael Schoen <schoenm@earthlink.net>] -* Fixed SQL Server adapter to pass even more tests and do even better #2634 [rtomayko@gmail.com] +* Fixed SQL Server adapter to pass even more tests and do even better #2634 [Ryan Tomayko] * Fixed SQL Server adapter so it honors options[:conditions] when applying :limits #1978 [Tom Ward] @@ -3924,18 +3924,18 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Added :offset and :limit to the kinds of options that Base.constrain can use #2466 [duane.johnson@gmail.com] -* Fixed handling of nil number columns on Oracle and cleaned up tests for Oracle in general #2555 [schoenm@earthlink.net] +* Fixed handling of nil number columns on Oracle and cleaned up tests for Oracle in general #2555 [Michael Schoen] * Added quoted_true and quoted_false methods and tables to db2_adapter and cleaned up tests for DB2 #2493, #2624 [maik schmidt] *1.12.2* (October 26th, 2005) -* Allow symbols to rename columns when using SQLite adapter. #2531 [kevin.clark@gmail.com] +* Allow symbols to rename columns when using SQLite adapter. #2531 [Kevin Clark] * Map Active Record time to SQL TIME. #2575, #2576 [Robby Russell <robby@planetargon.com>] -* Clarify semantics of ActiveRecord::Base#respond_to? #2560 [skaes@web.de] +* Clarify semantics of ActiveRecord::Base#respond_to? #2560 [Stefan Kaes] * Fixed Association#clear for associations which have not yet been accessed. #2524 [Patrick Lenz <patrick@lenz.sh>] @@ -3989,25 +3989,25 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Add test coverage for content_columns. #2432. [coffee2code] -* Speed up for unthreaded environments. #2431. [skaes@web.de] +* Speed up for unthreaded environments. #2431. [Stefan Kaes] -* Optimization for Mysql selects using mysql-ruby extension greater than 2.6.3. #2426. [skaes@web.de] +* Optimization for Mysql selects using mysql-ruby extension greater than 2.6.3. #2426. [Stefan Kaes] -* Speed up the setting of table_name. #2428. [skaes@web.de] +* Speed up the setting of table_name. #2428. [Stefan Kaes] -* Optimize instantiation of STI subclass records. In partial fullfilment of #1236. [skaes@web.de] +* Optimize instantiation of STI subclass records. In partial fullfilment of #1236. [Stefan Kaes] * Fix typo of 'constrains' to 'contraints'. #2069. [Michael Schuerig <michael@schuerig.de>] -* Optimization refactoring for add_limit_offset!. In partial fullfilment of #1236. [skaes@web.de] +* Optimization refactoring for add_limit_offset!. In partial fullfilment of #1236. [Stefan Kaes] * Add ability to get all siblings, including the current child, with acts_as_tree. Recloses #2140. [Michael Schuerig <michael@schuerig.de>] -* Add geometric type for postgresql adapter. #2233 [akaspick@gmail.com] +* Add geometric type for postgresql adapter. #2233 [Andrew Kaspick] -* Add option (true by default) to generate reader methods for each attribute of a record to avoid the overhead of calling method missing. In partial fullfilment of #1236. [skaes@web.de] +* Add option (true by default) to generate reader methods for each attribute of a record to avoid the overhead of calling method missing. In partial fullfilment of #1236. [Stefan Kaes] -* Add convenience predicate methods on Column class. In partial fullfilment of #1236. [skaes@web.de] +* Add convenience predicate methods on Column class. In partial fullfilment of #1236. [Stefan Kaes] * Raise errors when invalid hash keys are passed to ActiveRecord::Base.find. #2363 [Chad Fowler <chad@chadfowler.com>, Nicholas Seckar] @@ -4032,7 +4032,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Make update_attribute use the same writer method that update_attributes uses. #2237 [trevor@protocool.com] -* Make migrations honor table name prefixes and suffixes. #2298 [Jakob S, Marcel Molina] +* Make migrations honor table name prefixes and suffixes. #2298 [Jakob Skjerning, Marcel Molina Jr.] * Correct and optimize PostgreSQL bytea escaping. #1745, #1837 [dave@cherryville.org, ken@miriamtech.com, bellis@deepthought.org] @@ -4040,7 +4040,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Standardize the interpretation of boolean columns in the Mysql and Sqlite adapters. (Use MysqlAdapter.emulate_booleans = false to disable this behavior) -* Added new symbol-driven approach to activating observers with Base#observers= [DHH]. Example: +* Added new symbol-driven approach to activating observers with Base#observers= [David Heinemeier Hansson]. Example: ActiveRecord::Base.observers = :cacher, :garbage_collector @@ -4056,19 +4056,19 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed that the create_x method from belongs_to wouldn't save the association properly #2042 [Florian Weber] -* Fixed saving a record with two unsaved belongs_to associations pointing to the same object #2023 [Tobias Luetke] +* Fixed saving a record with two unsaved belongs_to associations pointing to the same object #2023 [Tobias Lütke] * Improved migrations' behavior when the schema_info table is empty. [Nicholas Seckar] * Fixed that Observers didn't observe sub-classes #627 [Florian Weber] -* Fix eager loading error messages, allow :include to specify tables using strings or symbols. Closes #2222 [Marcel Molina] +* Fix eager loading error messages, allow :include to specify tables using strings or symbols. Closes #2222 [Marcel Molina Jr.] * Added check for RAILS_CONNECTION_ADAPTERS on startup and only load the connection adapters specified within if its present (available in Rails through config.connection_adapters using the new config) #1958 [skae] * Fixed various problems with has_and_belongs_to_many when using customer finder_sql #2094 [Florian Weber] -* Added better exception error when unknown column types are used with migrations #1814 [fbeausoleil@ftml.net] +* Added better exception error when unknown column types are used with migrations #1814 [François Beausoleil] * Fixed "connection lost" issue with the bundled Ruby/MySQL driver (would kill the app after 8 hours of inactivity) #2163, #428 [kajism@yahoo.com] @@ -4084,13 +4084,13 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Make sure the schema_info table is created before querying the current version #1903 -* Fixtures ignore table name prefix and suffix #1987 [Jakob S] +* Fixtures ignore table name prefix and suffix #1987 [Jakob Skjerning] -* Add documentation for index_type argument to add_index method for migrations #2005 [blaine@odeo.com] +* Add documentation for index_type argument to add_index method for migrations #2005 [Blaine] * Modify read_attribute to allow a symbol argument #2024 [Ken Kunz] -* Make destroy return self #1913 [sebastian.kanthak@muehlheim.de] +* Make destroy return self #1913 [Sebastian Kanthak] * Fix typo in validations documentation #1938 [court3nay] @@ -4112,7 +4112,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed the handling of multiple blob columns in Oracle if one or more of them are null #1798 -* Added support for calling constrained class methods on has_many and has_and_belongs_to_many collections #1764 [Tobias Luetke] +* Added support for calling constrained class methods on has_many and has_and_belongs_to_many collections #1764 [Tobias Lütke] class Comment < AR:B def self.search(q) @@ -4144,19 +4144,19 @@ in effect. Added :readonly finder constraint. Calling an association collectio *1.11.1* (11 July, 2005) -* Added support for limit and offset with eager loading of has_one and belongs_to associations. Using the options with has_many and has_and_belongs_to_many associations will now raise an ActiveRecord::ConfigurationError #1692 [Rick Olsen] +* Added support for limit and offset with eager loading of has_one and belongs_to associations. Using the options with has_many and has_and_belongs_to_many associations will now raise an ActiveRecord::ConfigurationError #1692 [Rick Olson] * Fixed that assume_bottom_position (in acts_as_list) could be called on items already last in the list and they would move one position away from the list #1648 [tyler@kianta.com] * Added ActiveRecord::Base.threaded_connections flag to turn off 1-connection per thread (required for thread safety). By default it's on, but WEBrick in Rails need it off #1685 [Sam Stephenson] -* Correct reflected table name for singular associations. #1688 [court3nay@gmail.com] +* Correct reflected table name for singular associations. #1688 [court3nay] * Fixed optimistic locking with SQL Server #1660 [tom@popdog.net] * Added ActiveRecord::Migrator.migrate that can figure out whether to go up or down based on the target version and the current -* Added better error message for "packets out of order" #1630 [courtenay] +* Added better error message for "packets out of order" #1630 [court3nay] * Fixed first run of "rake migrate" on PostgreSQL by not expecting a return value on the id #1640 @@ -4167,7 +4167,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Changed logging of SQL statements to use the DEBUG level instead of INFO -* Added new Migrations framework for describing schema transformations in a way that can be easily applied across multiple databases #1604 [Tobias Luetke] See documentation under ActiveRecord::Migration and the additional support in the Rails rakefile/generator. +* Added new Migrations framework for describing schema transformations in a way that can be easily applied across multiple databases #1604 [Tobias Lütke] See documentation under ActiveRecord::Migration and the additional support in the Rails rakefile/generator. * Added callback hooks to association collections #1549 [Florian Weber]. Example: @@ -4190,13 +4190,13 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Speed up ActiveRecord#method_missing for the common case (read_attribute). -* Only notify observers on after_find and after_initialize if these methods are defined on the model. #1235 [skaes@web.de] +* Only notify observers on after_find and after_initialize if these methods are defined on the model. #1235 [Stefan Kaes] * Fixed that single-table inheritance sub-classes couldn't be used to limit the result set with eager loading #1215 [Chris McGrath] * Fixed validates_numericality_of to work with overrided getter-method when :allow_nil is on #1316 [raidel@onemail.at] -* Added roots, root, and siblings to the batch of methods added by acts_as_tree #1541 [michael@schuerig.de] +* Added roots, root, and siblings to the batch of methods added by acts_as_tree #1541 [Michael Schuerig] * Added support for limit/offset with the MS SQL Server driver so that pagination will now work #1569 [DeLynn Berry] @@ -4218,7 +4218,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio :conditions => 'project_id=1' ) -* Fixed that validations didn't respecting custom setting for too_short, too_long messages #1437 [Marcel Molina] +* Fixed that validations didn't respecting custom setting for too_short, too_long messages #1437 [Marcel Molina Jr.] * Fixed that clear_association_cache doesn't delete new associations on new records (so you can safely place new records in the session with Action Pack without having new associations wiped) #1494 [cluon] @@ -4245,7 +4245,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Corrected typo in find SQL for has_and_belongs_to_many. #1312 [ben@bensinclair.com] -* Fixed sanitized conditions for has_many finder method. #1281 [jackc@hylesanderson.com, pragdave, Tobias Luetke] +* Fixed sanitized conditions for has_many finder method. #1281 [jackc@hylesanderson.com, pragdave, Tobias Lütke] * Comprehensive PostgreSQL schema support. Use the optional schema_search_path directive in database.yml to give a comma-separated list of schemas to search for your tables. This allows you, for example, to have tables in a shared schema without having to use a custom table name. See http://www.postgresql.org/docs/8.0/interactive/ddl-schemas.html to learn more. #827 [dave@cherryville.org] @@ -4303,15 +4303,15 @@ in effect. Added :readonly finder constraint. Calling an association collectio # SELECT * FROM topics WHERE title IN ('First', 'Second') Topic.find_all_by_title(["First", "Second"]) -* Added compatibility with camelCase column names for dynamic finders #533 [Dee.Zsombor] +* Added compatibility with camelCase column names for dynamic finders #533 [Dee Zsombor] -* Fixed extraneous comma in count() function that made it not work with joins #1156 [jarkko/Dee.Zsombor] +* Fixed extraneous comma in count() function that made it not work with joins #1156 [Jarkko Laine/Dee Zsombor] * Fixed incompatibility with Base#find with an array of ids that would fail when using eager loading #1186 [Alisdair McDiarmid] * Fixed that validate_length_of lost :on option when :within was specified #1195 [jhosteny@mac.com] -* Added encoding and min_messages options for PostgreSQL #1205 [shugo]. Configuration example: +* Added encoding and min_messages options for PostgreSQL #1205 [Shugo Maeda]. Configuration example: development: adapter: postgresql @@ -4369,7 +4369,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio a single query. A good use case for this is a threaded post system, where you want to display every reply to a comment without multiple selects. -* Added Base.save! that attempts to save the record just like Base.save but will raise a RecordInvalid exception instead of returning false if the record is not valid [After much pestering from Dave Thomas] +* Added Base.save! that attempts to save the record just like Base.save but will raise a RecordInvalid exception instead of returning false if the record is not valid [Dave Thomas] * Fixed PostgreSQL usage of fixtures with regards to public schemas and table names with dots #962 [gnuman1@gmail.com] @@ -4399,7 +4399,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed counter_sql when no records exist in database for PostgreSQL (would give error, not 0) #1039 [Caleb Tennis] -* Fixed that benchmarking times for rendering included db runtimes #987 [skaes@web.de] +* Fixed that benchmarking times for rendering included db runtimes #987 [Stefan Kaes] * Fixed boolean queries for t/f fields in PostgreSQL #995 [dave@cherryville.org] @@ -4407,9 +4407,9 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed auto-stamping of dates (created_on/updated_on) for PostgreSQL #985 [dave@cherryville.org] -* Fixed Base.silence/benchmark to only log if a logger has been configured #986 [skaes@web.de] +* Fixed Base.silence/benchmark to only log if a logger has been configured #986 [Stefan Kaes] -* Added a join parameter as the third argument to Base.find_first and as the second to Base.count #426, #988 [skaes@web.de] +* Added a join parameter as the third argument to Base.find_first and as the second to Base.count #426, #988 [Stefan Kaes] * Fixed bug in Base#hash method that would treat records with the same string-based id as different [Dave Thomas] @@ -4495,7 +4495,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio account.save # => CC with id = 12 is destroyed -* Added validates_numericality_of #716 [skanthak/c.r.mcgrath]. Docuemntation: +* Added validates_numericality_of #716 [Sebastian Kanthak/Chris McGrath]. Docuemntation: Validates whether the value of the specified attribute is numeric by trying to convert it to a float with Kernel.Float (if <tt>integer</tt> is false) or applying it to the regular expression @@ -4565,7 +4565,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio 4. Added logic to the simplified_type method that allows the database to specify the scale of float data. 5. Adjusted the quote_column_name to account for the fact that MS SQL is bothered by a forward slash in the data string. -* Fixed that the dynamic finder like find_all_by_something_boolean(false) didn't work #649 [lmarlow@yahoo.com] +* Fixed that the dynamic finder like find_all_by_something_boolean(false) didn't work #649 [lmarlow] * Added validates_each that validates each specified attribute against a block #610 [Jeremy Kemper]. Example: @@ -4777,7 +4777,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio After: before_destroy { |record| Person.destroy_all "firm_id = #{record.id}" } -* Added :counter_cache option to acts_as_tree that works just like the one you can define on belongs_to #371 [Josh] +* Added :counter_cache option to acts_as_tree that works just like the one you can define on belongs_to #371 [Josh Peek] * Added Base.default_timezone accessor that determines whether to use Time.local (using :local) or Time.utc (using :utc) when pulling dates and times from the database. This is set to :local by default. @@ -4796,7 +4796,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed handling of binary content in blobs and similar fields for Ruby/MySQL and SQLite #409 [xal] -* Fixed a bug in the Ruby/MySQL that caused binary content to be escaped badly and come back mangled #405 [Tobias Luetke] +* Fixed a bug in the Ruby/MySQL that caused binary content to be escaped badly and come back mangled #405 [Tobias Lütke] * Fixed that the const_missing autoload assumes the requested constant is set by require_association and calls const_get to retrieve it. If require_association did not set the constant then const_get will call const_missing, resulting in an infinite loop #380 [Jeremy Kemper] @@ -4837,7 +4837,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Added work-around for PostgreSQL and the problem of getting fixtures to be created from id 1 on each test case. This only works for auto-incrementing primary keys called "id" for now #359 [Scott Baron] -* Added Base#clear_association_cache to empty all the cached associations #347 [Tobias Luetke] +* Added Base#clear_association_cache to empty all the cached associations #347 [Tobias Lütke] * Added more informative exceptions in establish_connection #356 [Jeremy Kemper] @@ -4854,7 +4854,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Added that query benchmarking will only happen if its going to be logged anyway #344 -* Added higher_item and lower_item as public methods for acts_as_list #342 [Tobias Luetke] +* Added higher_item and lower_item as public methods for acts_as_list #342 [Tobias Lütke] * Fixed that options[:counter_sql] was overwritten with interpolated sql rather than original sql #355 [Jeremy Kemper] @@ -4885,7 +4885,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio validates_inclusion_of :age, :in=>0..99 end -* Added acts_as_list that can decorates an existing class with methods like move_higher/lower, move_to_top/bottom. [Tobias Luetke] Example: +* Added acts_as_list that can decorates an existing class with methods like move_higher/lower, move_to_top/bottom. [Tobias Lütke] Example: class TodoItem < ActiveRecord::Base acts_as_list :scope => :todo_list_id @@ -4893,12 +4893,12 @@ in effect. Added :readonly finder constraint. Calling an association collectio end * Added acts_as_tree that can decorates an existing class with a many to many relationship with itself. Perfect for categories in - categories and the likes. [Tobias Luetke] + categories and the likes. [Tobias Lütke] * Added that Active Records will automatically record creation and/or update timestamps of database objects if fields of the names - created_at/created_on or updated_at/updated_on are present. [Tobias Luetke] + created_at/created_on or updated_at/updated_on are present. [Tobias Lütke] -* Added Base.default_error_messages as a hash of all the error messages used in the validates_*_of so they can be changed in one place [Tobias Luetke] +* Added Base.default_error_messages as a hash of all the error messages used in the validates_*_of so they can be changed in one place [Tobias Lütke] * Added automatic transaction block around AssociationCollection.<<, AssociationCollection.delete, and AssociationCollection.destroy_all @@ -4931,13 +4931,13 @@ in effect. Added :readonly finder constraint. Calling an association collectio errors.on("name") # => "must be shorter" * Added Base.validates_format_of that Validates whether the value of the specified attribute is of the correct form by matching - it against the regular expression provided. [Marcel] + it against the regular expression provided. [Marcel Molina Jr.] class Person < ActiveRecord::Base validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/, :on => :create end -* Added Base.validates_length_of that delegates to add_on_boundary_breaking #312 [Tobias Luetke]. Example: +* Added Base.validates_length_of that delegates to add_on_boundary_breaking #312 [Tobias Lütke]. Example: Validates that the specified attribute matches the length restrictions supplied in either: @@ -5156,7 +5156,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed that calling id would create the instance variable for new_records preventing them from being saved correctly [Jeremy Kemper] -* Added sanitization feature to HasManyAssociation#find_all so it works just like Base.find_all [Sam Stephenson/bitsweat] +* Added sanitization feature to HasManyAssociation#find_all so it works just like Base.find_all [Sam Stephenson/Jeremy Kemper] * Added that you can pass overlapping ids to find without getting duplicated records back [Jeremy Kemper] @@ -5166,7 +5166,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Fixed that quotes would break regular non-yaml fixtures [Dmitry Sabanin/daft] -* Fixed fixtures on windows with line endings cause problems under unix / mac [Tobias Luetke] +* Fixed fixtures on windows with line endings cause problems under unix / mac [Tobias Lütke] * Added HasAndBelongsToManyAssociation#find(id) that'll search inside the collection and find the object or record with that id @@ -5287,7 +5287,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio project.milestones << Milestone.find_all end -* Added logging of invalid SQL statements [Suggested by Daniel Von Fange] +* Added logging of invalid SQL statements [Daniel Von Fange] * Added alias Errors#[] for Errors#on, so you can now say person.errors["name"] to retrieve the errors for name [Andreas Schwarz] @@ -5319,7 +5319,7 @@ in effect. Added :readonly finder constraint. Calling an association collectio * Changed class inheritable attributes to not use eval [Caio Chassot] -* Changed Errors#add to now use "invalid" as the default message instead of true, which means full_messages work with those [Marcel Molina Jr] +* Changed Errors#add to now use "invalid" as the default message instead of true, which means full_messages work with those [Marcel Molina Jr.] * Fixed spelling on Base#add_on_boundry_breaking to Base#add_on_boundary_breaking (old naming still works) [Marcel Molina Jr.] @@ -5771,7 +5771,7 @@ _Misc_ *0.8.1* -* Added object-level transactions [Thanks to Austin Ziegler for Transaction::Simple] +* Added object-level transactions [Austin Ziegler] * Changed adapter-specific connection methods to use centralized ActiveRecord::Base.establish_connection, which is parametized through a config hash with symbol keys instead of a regular parameter list. @@ -5806,4 +5806,4 @@ _Misc_ *0.7.6* * Fixed the install.rb to create the lib/active_record/support directory [Spotted by Gavin Sinclair] -* Fixed that has_association? would always return true [Spotted by Daniel Von Fange] +* Fixed that has_association? would always return true [Daniel Von Fange] diff --git a/activerecord/lib/active_record/association_preload.rb b/activerecord/lib/active_record/association_preload.rb index 99c3ce5e62..7b1b2d9ad9 100644 --- a/activerecord/lib/active_record/association_preload.rb +++ b/activerecord/lib/active_record/association_preload.rb @@ -204,9 +204,18 @@ module ActiveRecord unless through_records.empty? source = reflection.source_reflection.name through_records.first.class.preload_associations(through_records, source) - through_records.each do |through_record| - add_preloaded_record_to_collection(id_to_record_map[through_record[through_primary_key].to_s], - reflection.name, through_record.send(source)) + if through_reflection.macro == :belongs_to + rev_id_to_record_map, rev_ids = construct_id_map(records, through_primary_key) + rev_primary_key = through_reflection.klass.primary_key + through_records.each do |through_record| + add_preloaded_record_to_collection(rev_id_to_record_map[through_record[rev_primary_key].to_s], + reflection.name, through_record.send(source)) + end + else + through_records.each do |through_record| + add_preloaded_record_to_collection(id_to_record_map[through_record[through_primary_key].to_s], + reflection.name, through_record.send(source)) + end end end else @@ -307,6 +316,7 @@ module ActiveRecord klasses_and_ids.each do |klass_and_id| klass_name, id_map = *klass_and_id + next if id_map.empty? klass = klass_name.constantize table_name = klass.quoted_table_name diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 5e83b29ca0..3cee9c7af2 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1731,6 +1731,11 @@ module ActiveRecord return sanitize_sql(sql) end + def tables_in_string(string) + return [] if string.blank? + string.scan(/([\.a-zA-Z_]+).?\./).flatten + end + def conditions_tables(options) # look in both sets of conditions conditions = [scope(:find, :conditions), options[:conditions]].inject([]) do |all, cond| @@ -1741,37 +1746,55 @@ module ActiveRecord else all << cond end end - conditions.join(' ').scan(/([\.a-zA-Z_]+).?\./).flatten + tables_in_string(conditions.join(' ')) end def order_tables(options) order = [options[:order], scope(:find, :order) ].join(", ") return [] unless order && order.is_a?(String) - order.scan(/([\.a-zA-Z_]+).?\./).flatten + tables_in_string(order) end def selects_tables(options) select = options[:select] return [] unless select && select.is_a?(String) - select.scan(/"?([\.a-zA-Z_]+)"?.?\./).flatten + tables_in_string(select) + end + + def joined_tables(options) + scope = scope(:find) + joins = options[:joins] + merged_joins = scope && scope[:joins] && joins ? merge_joins(scope[:joins], joins) : (joins || scope && scope[:joins]) + [table_name] + case merged_joins + when Symbol, Hash, Array + if array_of_strings?(merged_joins) + tables_in_string(merged_joins.join(' ')) + else + join_dependency = ActiveRecord::Associations::ClassMethods::InnerJoinDependency.new(self, merged_joins, nil) + join_dependency.join_associations.collect {|join_association| [join_association.aliased_join_table_name, join_association.aliased_table_name]}.flatten.compact + end + else + tables_in_string(merged_joins) + end end # Checks if the conditions reference a table other than the current model table - def include_eager_conditions?(options, tables = nil) - ((tables || conditions_tables(options)) - [table_name]).any? + def include_eager_conditions?(options, tables = nil, joined_tables = nil) + ((tables || conditions_tables(options)) - (joined_tables || joined_tables(options))).any? end # Checks if the query order references a table other than the current model's table. - def include_eager_order?(options, tables = nil) - ((tables || order_tables(options)) - [table_name]).any? + def include_eager_order?(options, tables = nil, joined_tables = nil) + ((tables || order_tables(options)) - (joined_tables || joined_tables(options))).any? end - def include_eager_select?(options) - (selects_tables(options) - [table_name]).any? + def include_eager_select?(options, joined_tables = nil) + (selects_tables(options) - (joined_tables || joined_tables(options))).any? end def references_eager_loaded_tables?(options) - include_eager_order?(options) || include_eager_conditions?(options) || include_eager_select?(options) + joined_tables = joined_tables(options) + include_eager_order?(options, nil, joined_tables) || include_eager_conditions?(options, nil, joined_tables) || include_eager_select?(options, joined_tables) end def using_limitable_reflections?(reflections) diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 0ff91fbdf8..0fefec1216 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -83,7 +83,11 @@ module ActiveRecord def to_ary load_target - @target.to_ary + if @target.is_a?(Array) + @target.to_ary + else + Array(@target) + end end def reset diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 77e5129a6b..aa6013583d 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1828,7 +1828,7 @@ module ActiveRecord #:nodoc: else find(:#{finder}, options.merge(finder_options)) end - #{'result || raise(RecordNotFound)' if bang} + #{'result || raise(RecordNotFound, "Couldn\'t find #{name} with #{attributes.to_a.collect {|pair| "#{pair.first} = #{pair.second}"}.join(\', \')}")' if bang} end }, __FILE__, __LINE__ send(method_id, *arguments) diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb index 6675041895..bbc290f721 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb @@ -122,7 +122,7 @@ module ActiveRecord def retrieve_connection connection_handler.retrieve_connection(self) end - + # Returns true if +ActiveRecord+ is connected. def connected? connection_handler.connected?(self) diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index ab3c6d843c..fe9cbcf024 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -31,12 +31,12 @@ module ActiveRecord @primary = nil end - + # Returns +true+ if the column is either of type string or text. def text? type == :string || type == :text end - + # Returns +true+ if the column is either of type integer, float or decimal. def number? type == :integer || type == :float || type == :decimal @@ -297,7 +297,7 @@ module ActiveRecord # puts t.class # => "ActiveRecord::ConnectionAdapters::TableDefinition" # end # end - # + # # def self.down # ... # end diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index c3cbdc8c2f..46d4b6c89c 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -308,6 +308,7 @@ module ActiveRecord rows end + # Executes a SQL query and returns a MySQL::Result object. Note that you have to free the Result object after you're done using it. def execute(sql, name = nil) #:nodoc: log(sql, name) { @connection.query(sql) } rescue ActiveRecord::StatementInvalid => exception @@ -414,7 +415,9 @@ module ActiveRecord def tables(name = nil) #:nodoc: tables = [] - execute("SHOW TABLES", name).each { |field| tables << field[0] } + result = execute("SHOW TABLES", name) + result.each { |field| tables << field[0] } + result.free tables end @@ -425,7 +428,8 @@ module ActiveRecord def indexes(table_name, name = nil)#:nodoc: indexes = [] current_index = nil - execute("SHOW KEYS FROM #{quote_table_name(table_name)}", name).each do |row| + result = execute("SHOW KEYS FROM #{quote_table_name(table_name)}", name) + result.each do |row| if current_index != row[2] next if row[2] == "PRIMARY" # skip the primary key current_index = row[2] @@ -434,13 +438,16 @@ module ActiveRecord indexes.last.columns << row[4] end + result.free indexes end def columns(table_name, name = nil)#:nodoc: sql = "SHOW FIELDS FROM #{quote_table_name(table_name)}" columns = [] - execute(sql, name).each { |field| columns << MysqlColumn.new(field[0], field[4], field[1], field[2] == "YES") } + result = execute(sql, name) + result.each { |field| columns << MysqlColumn.new(field[0], field[4], field[1], field[2] == "YES") } + result.free columns end @@ -521,9 +528,11 @@ module ActiveRecord # Returns a table's primary key and belonging sequence. def pk_and_sequence_for(table) #:nodoc: keys = [] - execute("describe #{quote_table_name(table)}").each_hash do |h| + result = execute("describe #{quote_table_name(table)}") + result.each_hash do |h| keys << h["Field"]if h["Key"] == "PRI" end + result.free keys.length == 1 ? [keys.first, nil] : nil end diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index 3c8408d14b..42063d18a3 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -1,6 +1,7 @@ require "cases/helper" require 'models/post' require 'models/tagging' +require 'models/tag' require 'models/comment' require 'models/author' require 'models/category' @@ -145,7 +146,7 @@ class EagerAssociationTest < ActiveRecord::TestCase def test_finding_with_includes_on_null_belongs_to_association_with_same_include_includes_only_once post = posts(:welcome) post.update_attributes!(:author => nil) - post = assert_queries(2) { Post.find(post.id, :include => {:author_with_address => :author_address}) } # find the post, then find the author which is null so no query for the address + post = assert_queries(1) { Post.find(post.id, :include => {:author_with_address => :author_address}) } # find the post, then find the author which is null so no query for the author or address assert_no_queries do assert_equal nil, post.author_with_address end @@ -705,4 +706,69 @@ class EagerAssociationTest < ActiveRecord::TestCase def test_order_on_join_table_with_include_and_limit assert_equal 5, Developer.find(:all, :include => 'projects', :order => 'developers_projects.joined_on DESC', :limit => 5).size end + + def test_eager_loading_with_order_on_joined_table_preloads + posts = assert_queries(2) do + Post.find(:all, :joins => :comments, :include => :author, :order => 'comments.id DESC') + end + assert_equal posts(:eager_other), posts[0] + assert_equal authors(:mary), assert_no_queries { posts[0].author} + end + + def test_eager_loading_with_conditions_on_joined_table_preloads + posts = assert_queries(2) do + Post.find(:all, :select => 'distinct posts.*', :include => :author, :joins => [:comments], :conditions => "comments.body like 'Thank you%'", :order => 'posts.id') + end + assert_equal [posts(:welcome)], posts + assert_equal authors(:david), assert_no_queries { posts[0].author} + + posts = assert_queries(2) do + Post.find(:all, :select => 'distinct posts.*', :include => :author, :joins => [:comments], :conditions => "comments.body like 'Thank you%'", :order => 'posts.id') + end + assert_equal [posts(:welcome)], posts + assert_equal authors(:david), assert_no_queries { posts[0].author} + + posts = assert_queries(2) do + Post.find(:all, :include => :author, :joins => {:taggings => :tag}, :conditions => "tags.name = 'General'") + end + assert_equal posts(:welcome, :thinking), posts + + posts = assert_queries(2) do + Post.find(:all, :include => :author, :joins => {:taggings => {:tag => :taggings}}, :conditions => "taggings_tags.super_tag_id=2") + end + assert_equal posts(:welcome, :thinking), posts + + end + + def test_eager_loading_with_conditions_on_string_joined_table_preloads + posts = assert_queries(2) do + Post.find(:all, :select => 'distinct posts.*', :include => :author, :joins => "INNER JOIN comments on comments.post_id = posts.id", :conditions => "comments.body like 'Thank you%'", :order => 'posts.id') + end + assert_equal [posts(:welcome)], posts + assert_equal authors(:david), assert_no_queries { posts[0].author} + + posts = assert_queries(2) do + Post.find(:all, :select => 'distinct posts.*', :include => :author, :joins => ["INNER JOIN comments on comments.post_id = posts.id"], :conditions => "comments.body like 'Thank you%'", :order => 'posts.id') + end + assert_equal [posts(:welcome)], posts + assert_equal authors(:david), assert_no_queries { posts[0].author} + + end + + def test_eager_loading_with_select_on_joined_table_preloads + posts = assert_queries(2) do + Post.find(:all, :select => 'posts.*, authors.name as author_name', :include => :comments, :joins => :author, :order => 'posts.id') + end + assert_equal 'David', posts[0].author_name + assert_equal posts(:welcome).comments, assert_no_queries { posts[0].comments} + end + + def test_eager_loading_with_conditions_on_join_model_preloads + authors = assert_queries(2) do + Author.find(:all, :include => :author_address, :joins => :comments, :conditions => "posts.title like 'Welcome%'") + end + assert_equal authors(:david), authors[0] + assert_equal author_addresses(:david_address), authors[0].author_address + end + end diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index a07f4bcbdd..0bfda337b2 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -3,6 +3,9 @@ require 'models/post' require 'models/person' require 'models/reader' require 'models/comment' +require 'models/tag' +require 'models/tagging' +require 'models/author' class HasManyThroughAssociationsTest < ActiveRecord::TestCase fixtures :posts, :readers, :people, :comments, :authors diff --git a/activerecord/test/cases/associations/has_one_through_associations_test.rb b/activerecord/test/cases/associations/has_one_through_associations_test.rb index 7d418de965..f65d76e2ce 100644 --- a/activerecord/test/cases/associations/has_one_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_one_through_associations_test.rb @@ -1,5 +1,6 @@ require "cases/helper" require 'models/club' +require 'models/member_type' require 'models/member' require 'models/membership' require 'models/sponsor' @@ -7,7 +8,7 @@ require 'models/organization' require 'models/member_detail' class HasOneThroughAssociationsTest < ActiveRecord::TestCase - fixtures :members, :clubs, :memberships, :sponsors, :organizations + fixtures :member_types, :members, :clubs, :memberships, :sponsors, :organizations def setup @member = members(:groucho) @@ -158,4 +159,18 @@ class HasOneThroughAssociationsTest < ActiveRecord::TestCase assert @new_organization.members.include?(@member) end + def test_preloading_has_one_through_on_belongs_to + assert_not_nil @member.member_type + @organization = organizations(:nsa) + @member_detail = MemberDetail.new + @member.member_detail = @member_detail + @member.organization = @organization + @member_details = assert_queries(3) do + MemberDetail.find(:all, :include => :member_type) + end + @new_detail = @member_details[0] + assert @new_detail.loaded_member_type? + assert_not_nil assert_no_queries { @new_detail.member_type } + end + end diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb index afba715448..2043138ca3 100644 --- a/activerecord/test/cases/helper.rb +++ b/activerecord/test/cases/helper.rb @@ -9,6 +9,8 @@ require 'active_record/test_case' require 'active_record/fixtures' require 'connection' +require 'cases/repair_helper' + # Show backtraces for deprecated behavior for quicker cleanup. ActiveSupport::Deprecation.debug = true @@ -60,6 +62,8 @@ end class ActiveSupport::TestCase include ActiveRecord::TestFixtures + include ActiveRecord::Testing::RepairHelper + self.fixture_path = FIXTURES_ROOT self.use_instantiated_fixtures = false self.use_transactional_fixtures = true diff --git a/activerecord/test/cases/repair_helper.rb b/activerecord/test/cases/repair_helper.rb new file mode 100644 index 0000000000..0155668811 --- /dev/null +++ b/activerecord/test/cases/repair_helper.rb @@ -0,0 +1,50 @@ +module ActiveRecord + module Testing + module RepairHelper + def self.included(base) + base.class_eval do + extend ClassMethods + end + end + + module Toolbox + def self.record_validations(*model_classes) + model_classes.inject({}) do |repair, klass| + repair[klass] ||= {} + [:validate, :validate_on_create, :validate_on_update].each do |callback| + the_callback = klass.instance_variable_get("@#{callback.to_s}_callbacks") + repair[klass][callback] = (the_callback.nil? ? nil : the_callback.dup) + end + repair + end + end + + def self.reset_validations(recorded) + recorded.each do |klass, repairs| + [:validate, :validate_on_create, :validate_on_update].each do |callback| + klass.instance_variable_set("@#{callback.to_s}_callbacks", repairs[callback]) + end + end + end + end + + module ClassMethods + def repair_validations(*model_classes) + setup do + @validation_repairs = ActiveRecord::Testing::RepairHelper::Toolbox.record_validations(*model_classes) + end + teardown do + ActiveRecord::Testing::RepairHelper::Toolbox.reset_validations(@validation_repairs) + end + end + end + + def repair_validations(*model_classes, &block) + validation_repairs = ActiveRecord::Testing::RepairHelper::Toolbox.record_validations(*model_classes) + return block.call + ensure + ActiveRecord::Testing::RepairHelper::Toolbox.reset_validations(validation_repairs) + end + end + end +end diff --git a/activerecord/test/cases/validations_test.rb b/activerecord/test/cases/validations_test.rb index c049659327..380d8ac260 100644 --- a/activerecord/test/cases/validations_test.rb +++ b/activerecord/test/cases/validations_test.rb @@ -6,6 +6,8 @@ require 'models/person' require 'models/developer' require 'models/warehouse_thing' require 'models/guid' +require 'models/owner' +require 'models/pet' # The following methods in Topic are used in test_conditional_validation_* class Topic @@ -31,10 +33,6 @@ class UniqueReply < Reply validates_uniqueness_of :content, :scope => 'parent_id' end -class PlagiarizedReply < Reply - validates_acceptance_of :author_name -end - class SillyUniqueReply < UniqueReply end @@ -58,11 +56,9 @@ end class ValidationsTest < ActiveRecord::TestCase fixtures :topics, :developers, 'warehouse-things' - def setup - Topic.instance_variable_set("@validate_callbacks", ActiveSupport::Callbacks::CallbackChain.new) - Topic.instance_variable_set("@validate_on_create_callbacks", ActiveSupport::Callbacks::CallbackChain.new) - Topic.instance_variable_set("@validate_on_update_callbacks", ActiveSupport::Callbacks::CallbackChain.new) - end + # Most of the tests mess with the validations of Topic, so lets repair it all the time. + # Other classes we mess with will be dealt with in the specific tests + repair_validations(Topic) def test_single_field_validation r = Reply.new @@ -134,7 +130,7 @@ class ValidationsTest < ActiveRecord::TestCase Reply.create!([ { "title" => "OK" }, { "title" => "Wrong Create" }]) end end - + def test_exception_on_create_bang_with_block assert_raises(ActiveRecord::RecordInvalid) do Reply.create!({ "title" => "OK" }) do |r| @@ -142,7 +138,7 @@ class ValidationsTest < ActiveRecord::TestCase end end end - + def test_exception_on_create_bang_many_with_block assert_raises(ActiveRecord::RecordInvalid) do Reply.create!([{ "title" => "OK" }, { "title" => "Wrong Create" }]) do |r| @@ -229,21 +225,16 @@ class ValidationsTest < ActiveRecord::TestCase end def test_validates_each - perform = true hits = 0 Topic.validates_each(:title, :content, [:title, :content]) do |record, attr| - if perform - record.errors.add attr, 'gotcha' - hits += 1 - end + record.errors.add attr, 'gotcha' + hits += 1 end t = Topic.new("title" => "valid", "content" => "whatever") assert !t.save assert_equal 4, hits assert_equal %w(gotcha gotcha), t.errors.on(:title) assert_equal %w(gotcha gotcha), t.errors.on(:content) - ensure - perform = false end def test_no_title_confirmation @@ -315,8 +306,12 @@ class ValidationsTest < ActiveRecord::TestCase end def test_validates_acceptance_of_as_database_column - reply = PlagiarizedReply.create("author_name" => "Dan Brown") - assert_equal "Dan Brown", reply["author_name"] + repair_validations(Reply) do + Reply.validates_acceptance_of(:author_name) + + reply = Reply.create("author_name" => "Dan Brown") + assert_equal "Dan Brown", reply["author_name"] + end end def test_validates_acceptance_of_with_non_existant_table @@ -372,22 +367,24 @@ class ValidationsTest < ActiveRecord::TestCase end def test_validate_uniqueness_with_scope - Reply.validates_uniqueness_of(:content, :scope => "parent_id") + repair_validations(Reply) do + Reply.validates_uniqueness_of(:content, :scope => "parent_id") - t = Topic.create("title" => "I'm unique!") + t = Topic.create("title" => "I'm unique!") - r1 = t.replies.create "title" => "r1", "content" => "hello world" - assert r1.valid?, "Saving r1" + r1 = t.replies.create "title" => "r1", "content" => "hello world" + assert r1.valid?, "Saving r1" - r2 = t.replies.create "title" => "r2", "content" => "hello world" - assert !r2.valid?, "Saving r2 first time" + r2 = t.replies.create "title" => "r2", "content" => "hello world" + assert !r2.valid?, "Saving r2 first time" - r2.content = "something else" - assert r2.save, "Saving r2 second time" + r2.content = "something else" + assert r2.save, "Saving r2 second time" - t2 = Topic.create("title" => "I'm unique too!") - r3 = t2.replies.create "title" => "r3", "content" => "hello world" - assert r3.valid?, "Saving r3" + t2 = Topic.create("title" => "I'm unique too!") + r3 = t2.replies.create "title" => "r3", "content" => "hello world" + assert r3.valid?, "Saving r3" + end end def test_validate_uniqueness_scoped_to_defining_class @@ -406,27 +403,29 @@ class ValidationsTest < ActiveRecord::TestCase end def test_validate_uniqueness_with_scope_array - Reply.validates_uniqueness_of(:author_name, :scope => [:author_email_address, :parent_id]) + repair_validations(Reply) do + Reply.validates_uniqueness_of(:author_name, :scope => [:author_email_address, :parent_id]) - t = Topic.create("title" => "The earth is actually flat!") + t = Topic.create("title" => "The earth is actually flat!") - r1 = t.replies.create "author_name" => "jeremy", "author_email_address" => "jeremy@rubyonrails.com", "title" => "You're crazy!", "content" => "Crazy reply" - assert r1.valid?, "Saving r1" + r1 = t.replies.create "author_name" => "jeremy", "author_email_address" => "jeremy@rubyonrails.com", "title" => "You're crazy!", "content" => "Crazy reply" + assert r1.valid?, "Saving r1" - r2 = t.replies.create "author_name" => "jeremy", "author_email_address" => "jeremy@rubyonrails.com", "title" => "You're crazy!", "content" => "Crazy reply again..." - assert !r2.valid?, "Saving r2. Double reply by same author." + r2 = t.replies.create "author_name" => "jeremy", "author_email_address" => "jeremy@rubyonrails.com", "title" => "You're crazy!", "content" => "Crazy reply again..." + assert !r2.valid?, "Saving r2. Double reply by same author." - r2.author_email_address = "jeremy_alt_email@rubyonrails.com" - assert r2.save, "Saving r2 the second time." + r2.author_email_address = "jeremy_alt_email@rubyonrails.com" + assert r2.save, "Saving r2 the second time." - r3 = t.replies.create "author_name" => "jeremy", "author_email_address" => "jeremy_alt_email@rubyonrails.com", "title" => "You're wrong", "content" => "It's cubic" - assert !r3.valid?, "Saving r3" + r3 = t.replies.create "author_name" => "jeremy", "author_email_address" => "jeremy_alt_email@rubyonrails.com", "title" => "You're wrong", "content" => "It's cubic" + assert !r3.valid?, "Saving r3" - r3.author_name = "jj" - assert r3.save, "Saving r3 the second time." + r3.author_name = "jj" + assert r3.save, "Saving r3 the second time." - r3.author_name = "jeremy" - assert !r3.save, "Saving r3 the third time." + r3.author_name = "jeremy" + assert !r3.save, "Saving r3 the third time." + end end def test_validate_case_insensitive_uniqueness @@ -523,10 +522,12 @@ class ValidationsTest < ActiveRecord::TestCase end def test_validate_uniqueness_with_columns_which_are_sql_keywords - Guid.validates_uniqueness_of :key - g = Guid.new - g.key = "foo" - assert_nothing_raised { !g.valid? } + repair_validations(Guid) do + Guid.validates_uniqueness_of :key + g = Guid.new + g.key = "foo" + assert_nothing_raised { !g.valid? } + end end def test_validate_straight_inheritance_uniqueness @@ -648,10 +649,12 @@ class ValidationsTest < ActiveRecord::TestCase end def test_numericality_with_getter_method - Developer.validates_numericality_of( :salary ) - developer = Developer.new("name" => "michael", "salary" => nil) - developer.instance_eval("def salary; read_attribute('salary') ? read_attribute('salary') : 100000; end") - assert developer.valid? + repair_validations(Developer) do + Developer.validates_numericality_of( :salary ) + developer = Developer.new("name" => "michael", "salary" => nil) + developer.instance_eval("def salary; read_attribute('salary') ? read_attribute('salary') : 100000; end") + assert developer.valid? + end end def test_validates_length_of_with_allow_nil @@ -684,10 +687,12 @@ class ValidationsTest < ActiveRecord::TestCase end def test_numericality_with_allow_nil_and_getter_method - Developer.validates_numericality_of( :salary, :allow_nil => true) - developer = Developer.new("name" => "michael", "salary" => nil) - developer.instance_eval("def salary; read_attribute('salary') ? read_attribute('salary') : 100000; end") - assert developer.valid? + repair_validations(Developer) do + Developer.validates_numericality_of( :salary, :allow_nil => true) + developer = Developer.new("name" => "michael", "salary" => nil) + developer.instance_eval("def salary; read_attribute('salary') ? read_attribute('salary') : 100000; end") + assert developer.valid? + end end def test_validates_exclusion_of @@ -892,26 +897,30 @@ class ValidationsTest < ActiveRecord::TestCase end def test_validates_size_of_association - assert_nothing_raised { Topic.validates_size_of :replies, :minimum => 1 } - t = Topic.new('title' => 'noreplies', 'content' => 'whatever') - assert !t.save - assert t.errors.on(:replies) - reply = t.replies.build('title' => 'areply', 'content' => 'whateveragain') - assert t.valid? + repair_validations(Owner) do + assert_nothing_raised { Owner.validates_size_of :pets, :minimum => 1 } + o = Owner.new('name' => 'nopets') + assert !o.save + assert o.errors.on(:pets) + pet = o.pets.build('name' => 'apet') + assert o.valid? + end end def test_validates_size_of_association_using_within - assert_nothing_raised { Topic.validates_size_of :replies, :within => 1..2 } - t = Topic.new('title' => 'noreplies', 'content' => 'whatever') - assert !t.save - assert t.errors.on(:replies) - - reply = t.replies.build('title' => 'areply', 'content' => 'whateveragain') - assert t.valid? - - 2.times { t.replies.build('title' => 'areply', 'content' => 'whateveragain') } - assert !t.save - assert t.errors.on(:replies) + repair_validations(Owner) do + assert_nothing_raised { Owner.validates_size_of :pets, :within => 1..2 } + o = Owner.new('name' => 'nopets') + assert !o.save + assert o.errors.on(:pets) + + pet = o.pets.build('name' => 'apet') + assert o.valid? + + 2.times { o.pets.build('name' => 'apet') } + assert !o.save + assert o.errors.on(:pets) + end end def test_validates_length_of_nasty_params @@ -1102,13 +1111,15 @@ class ValidationsTest < ActiveRecord::TestCase end def test_validates_size_of_association_utf8 - with_kcode('UTF8') do - assert_nothing_raised { Topic.validates_size_of :replies, :minimum => 1 } - t = Topic.new('title' => 'あいうえお', 'content' => 'かきくけこ') - assert !t.save - assert t.errors.on(:replies) - t.replies.build('title' => 'あいうえお', 'content' => 'かきくけこ') - assert t.valid? + repair_validations(Owner) do + with_kcode('UTF8') do + assert_nothing_raised { Owner.validates_size_of :pets, :minimum => 1 } + o = Owner.new('name' => 'あいうえおかきくけこ') + assert !o.save + assert o.errors.on(:pets) + o.pets.build('name' => 'あいうえおかきくけこ') + assert o.valid? + end end end @@ -1127,14 +1138,16 @@ class ValidationsTest < ActiveRecord::TestCase end def test_validates_associated_one - Reply.validates_associated( :topic ) - Topic.validates_presence_of( :content ) - r = Reply.new("title" => "A reply", "content" => "with content!") - r.topic = Topic.create("title" => "uhohuhoh") - assert !r.valid? - assert r.errors.on(:topic) - r.topic.content = "non-empty" - assert r.valid? + repair_validations(Reply) do + Reply.validates_associated( :topic ) + Topic.validates_presence_of( :content ) + r = Reply.new("title" => "A reply", "content" => "with content!") + r.topic = Topic.create("title" => "uhohuhoh") + assert !r.valid? + assert r.errors.on(:topic) + r.topic.content = "non-empty" + assert r.valid? + end end def test_validate_block @@ -1158,85 +1171,105 @@ class ValidationsTest < ActiveRecord::TestCase end def test_validates_acceptance_of_with_custom_error_using_quotes - Developer.validates_acceptance_of :salary, :message=> "This string contains 'single' and \"double\" quotes" - d = Developer.new - d.salary = "0" - assert !d.valid? - assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:salary).last + repair_validations(Developer) do + Developer.validates_acceptance_of :salary, :message=> "This string contains 'single' and \"double\" quotes" + d = Developer.new + d.salary = "0" + assert !d.valid? + assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:salary).last + end end def test_validates_confirmation_of_with_custom_error_using_quotes - Developer.validates_confirmation_of :name, :message=> "confirm 'single' and \"double\" quotes" - d = Developer.new - d.name = "John" - d.name_confirmation = "Johnny" - assert !d.valid? - assert_equal "confirm 'single' and \"double\" quotes", d.errors.on(:name) + repair_validations(Developer) do + Developer.validates_confirmation_of :name, :message=> "confirm 'single' and \"double\" quotes" + d = Developer.new + d.name = "John" + d.name_confirmation = "Johnny" + assert !d.valid? + assert_equal "confirm 'single' and \"double\" quotes", d.errors.on(:name) + end end def test_validates_format_of_with_custom_error_using_quotes - Developer.validates_format_of :name, :with => /^(A-Z*)$/, :message=> "format 'single' and \"double\" quotes" - d = Developer.new - d.name = d.name_confirmation = "John 32" - assert !d.valid? - assert_equal "format 'single' and \"double\" quotes", d.errors.on(:name) + repair_validations(Developer) do + Developer.validates_format_of :name, :with => /^(A-Z*)$/, :message=> "format 'single' and \"double\" quotes" + d = Developer.new + d.name = d.name_confirmation = "John 32" + assert !d.valid? + assert_equal "format 'single' and \"double\" quotes", d.errors.on(:name) + end end def test_validates_inclusion_of_with_custom_error_using_quotes - Developer.validates_inclusion_of :salary, :in => 1000..80000, :message=> "This string contains 'single' and \"double\" quotes" - d = Developer.new - d.salary = "90,000" - assert !d.valid? - assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:salary).last + repair_validations(Developer) do + Developer.validates_inclusion_of :salary, :in => 1000..80000, :message=> "This string contains 'single' and \"double\" quotes" + d = Developer.new + d.salary = "90,000" + assert !d.valid? + assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:salary).last + end end def test_validates_length_of_with_custom_too_long_using_quotes - Developer.validates_length_of :name, :maximum => 4, :too_long=> "This string contains 'single' and \"double\" quotes" - d = Developer.new - d.name = "Jeffrey" - assert !d.valid? - assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:name).last + repair_validations(Developer) do + Developer.validates_length_of :name, :maximum => 4, :too_long=> "This string contains 'single' and \"double\" quotes" + d = Developer.new + d.name = "Jeffrey" + assert !d.valid? + assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:name) + end end def test_validates_length_of_with_custom_too_short_using_quotes - Developer.validates_length_of :name, :minimum => 4, :too_short=> "This string contains 'single' and \"double\" quotes" - d = Developer.new - d.name = "Joe" - assert !d.valid? - assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:name).last + repair_validations(Developer) do + Developer.validates_length_of :name, :minimum => 4, :too_short=> "This string contains 'single' and \"double\" quotes" + d = Developer.new + d.name = "Joe" + assert !d.valid? + assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:name) + end end def test_validates_length_of_with_custom_message_using_quotes - Developer.validates_length_of :name, :minimum => 4, :message=> "This string contains 'single' and \"double\" quotes" - d = Developer.new - d.name = "Joe" - assert !d.valid? - assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:name).last + repair_validations(Developer) do + Developer.validates_length_of :name, :minimum => 4, :message=> "This string contains 'single' and \"double\" quotes" + d = Developer.new + d.name = "Joe" + assert !d.valid? + assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:name) + end end def test_validates_presence_of_with_custom_message_using_quotes - Developer.validates_presence_of :non_existent, :message=> "This string contains 'single' and \"double\" quotes" - d = Developer.new - d.name = "Joe" - assert !d.valid? - assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:non_existent) + repair_validations(Developer) do + Developer.validates_presence_of :non_existent, :message=> "This string contains 'single' and \"double\" quotes" + d = Developer.new + d.name = "Joe" + assert !d.valid? + assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:non_existent) + end end def test_validates_uniqueness_of_with_custom_message_using_quotes - Developer.validates_uniqueness_of :name, :message=> "This string contains 'single' and \"double\" quotes" - d = Developer.new - d.name = "David" - assert !d.valid? - assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:name).last + repair_validations(Developer) do + Developer.validates_uniqueness_of :name, :message=> "This string contains 'single' and \"double\" quotes" + d = Developer.new + d.name = "David" + assert !d.valid? + assert_equal "This string contains 'single' and \"double\" quotes", d.errors.on(:name) + end end def test_validates_associated_with_custom_message_using_quotes - Reply.validates_associated :topic, :message=> "This string contains 'single' and \"double\" quotes" - Topic.validates_presence_of :content - r = Reply.create("title" => "A reply", "content" => "with content!") - r.topic = Topic.create("title" => "uhohuhoh") - assert !r.valid? - assert_equal "This string contains 'single' and \"double\" quotes", r.errors.on(:topic).last + repair_validations(Reply) do + Reply.validates_associated :topic, :message=> "This string contains 'single' and \"double\" quotes" + Topic.validates_presence_of :content + r = Reply.create("title" => "A reply", "content" => "with content!") + r.topic = Topic.create("title" => "uhohuhoh") + assert !r.valid? + assert_equal "This string contains 'single' and \"double\" quotes", r.errors.on(:topic) + end end def test_if_validation_using_method_true @@ -1346,13 +1379,15 @@ class ValidationsTest < ActiveRecord::TestCase end def test_validates_associated_missing - Reply.validates_presence_of(:topic) - r = Reply.create("title" => "A reply", "content" => "with content!") - assert !r.valid? - assert r.errors.on(:topic) - - r.topic = Topic.find :first - assert r.valid? + repair_validations(Reply) do + Reply.validates_presence_of(:topic) + r = Reply.create("title" => "A reply", "content" => "with content!") + assert !r.valid? + assert r.errors.on(:topic) + + r.topic = Topic.find :first + assert r.valid? + end end def test_errors_to_xml @@ -1364,14 +1399,14 @@ class ValidationsTest < ActiveRecord::TestCase assert xml.include?("<error>Content Empty</error>") end - def test_validation_order - Topic.validates_presence_of :title - Topic.validates_length_of :title, :minimum => 2 + def test_validation_order + Topic.validates_presence_of :title + Topic.validates_length_of :title, :minimum => 2 - t = Topic.new("title" => "") - assert !t.valid? - assert_equal "can't be blank", t.errors.on("title").first - end + t = Topic.new("title" => "") + assert !t.valid? + assert_equal "can't be blank", t.errors.on("title").first + end # previous implementation of validates_presence_of eval'd the # string with the wrong binding, this regression test is to @@ -1423,11 +1458,7 @@ class ValidatesNumericalityTest < ActiveRecord::TestCase JUNK = ["not a number", "42 not a number", "0xdeadbeef", "00-1", "--3", "+-3", "+3-1", "-+019.0", "12.12.13.12", "123\nnot a number"] INFINITY = [1.0/0.0] - def setup - Topic.instance_variable_set("@validate_callbacks", ActiveSupport::Callbacks::CallbackChain.new) - Topic.instance_variable_set("@validate_on_create_callbacks", ActiveSupport::Callbacks::CallbackChain.new) - Topic.instance_variable_set("@validate_on_update_callbacks", ActiveSupport::Callbacks::CallbackChain.new) - end + repair_validations(Topic) def test_default_validates_numericality_of Topic.validates_numericality_of :approved diff --git a/activerecord/test/fixtures/member_types.yml b/activerecord/test/fixtures/member_types.yml new file mode 100644 index 0000000000..797a57430c --- /dev/null +++ b/activerecord/test/fixtures/member_types.yml @@ -0,0 +1,6 @@ +founding: + id: 1 + name: Founding +provisional: + id: 2 + name: Provisional diff --git a/activerecord/test/fixtures/members.yml b/activerecord/test/fixtures/members.yml index 67a6cc459a..6db945e61d 100644 --- a/activerecord/test/fixtures/members.yml +++ b/activerecord/test/fixtures/members.yml @@ -1,4 +1,6 @@ groucho: name: Groucho Marx + member_type_id: 1 some_other_guy: - name: Englebert Humperdink
\ No newline at end of file + name: Englebert Humperdink + member_type_id: 2 diff --git a/activerecord/test/models/member.rb b/activerecord/test/models/member.rb index 77a37abb38..255fb569d7 100644 --- a/activerecord/test/models/member.rb +++ b/activerecord/test/models/member.rb @@ -8,4 +8,5 @@ class Member < ActiveRecord::Base has_one :sponsor_club, :through => :sponsor has_one :member_detail has_one :organization, :through => :member_detail + belongs_to :member_type end
\ No newline at end of file diff --git a/activerecord/test/models/member_detail.rb b/activerecord/test/models/member_detail.rb index e731454556..94f59e5794 100644 --- a/activerecord/test/models/member_detail.rb +++ b/activerecord/test/models/member_detail.rb @@ -1,4 +1,5 @@ class MemberDetail < ActiveRecord::Base belongs_to :member belongs_to :organization + has_one :member_type, :through => :member end diff --git a/activerecord/test/models/member_type.rb b/activerecord/test/models/member_type.rb new file mode 100644 index 0000000000..a13561c72a --- /dev/null +++ b/activerecord/test/models/member_type.rb @@ -0,0 +1,3 @@ +class MemberType < ActiveRecord::Base + has_many :members +end diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index 6217e3bc1c..fbacc692b4 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -195,6 +195,7 @@ ActiveRecord::Schema.define do create_table :members, :force => true do |t| t.string :name + t.integer :member_type_id end create_table :member_details, :force => true do |t| @@ -210,6 +211,10 @@ ActiveRecord::Schema.define do t.string :type end + create_table :member_types, :force => true do |t| + t.string :name + end + create_table :references, :force => true do |t| t.integer :person_id t.integer :job_id diff --git a/activeresource/CHANGELOG b/activeresource/CHANGELOG index e05a634a12..428c6d91e9 100644 --- a/activeresource/CHANGELOG +++ b/activeresource/CHANGELOG @@ -20,15 +20,15 @@ * Fixed that to_param should be used and honored instead of hardcoding the id #11406 [gspiers] -* Improve documentation. [Radar, Jan De Poorter, chuyeow, xaviershay, danger, miloops, Xavier Noria, Sunny Ripert] +* Improve documentation. [Ryan Bigg, Jan De Poorter, Cheah Chu Yeow, Xavier Shay, Jack Danger Canty, Emilio Tagua, Xavier Noria, Sunny Ripert] * Use HEAD instead of GET in exists? [bscofield] -* Fix small documentation typo. Closes #10670 [l.guidi] +* Fix small documentation typo. Closes #10670 [Luca Guidi] * find_or_create_resource_for handles module nesting. #10646 [xavier] -* Allow setting ActiveResource::Base#format before #site. [rick] +* Allow setting ActiveResource::Base#format before #site. [Rick Olson] * Support agnostic formats when calling custom methods. Closes #10635 [joerichsen] @@ -48,9 +48,9 @@ * Don't cache net/http object so that ActiveResource is more thread-safe. Closes #10142 [kou] -* Update XML documentation examples to include explicit type attributes. Closes #9754 [hasmanyjosh] +* Update XML documentation examples to include explicit type attributes. Closes #9754 [Josh Susser] -* Added one-off declarations of mock behavior [DHH]. Example: +* Added one-off declarations of mock behavior [David Heinemeier Hansson]. Example: Before: ActiveResource::HttpMock.respond_to do |mock| @@ -60,7 +60,7 @@ Now: ActiveResource::HttpMock.respond_to.get "/people/1.xml", {}, "<person><name>David</name></person>" -* Added ActiveResource.format= which defaults to :xml but can also be set to :json [DHH]. Example: +* Added ActiveResource.format= which defaults to :xml but can also be set to :json [David Heinemeier Hansson]. Example: class Person < ActiveResource::Base self.site = "http://app/" @@ -81,7 +81,7 @@ * Fix query methods on resources. [Cody Fauser] -* pass the prefix_options to the instantiated record when using find without a specific id. Closes #8544 [alloy] +* pass the prefix_options to the instantiated record when using find without a specific id. Closes #8544 [Eloy Duran] * Recognize and raise an exception on 405 Method Not Allowed responses. #7692 [Josh Peek] @@ -89,15 +89,15 @@ Comment.find(:all, :params => { :article_id => 5, :page => 2 }) or Comment.find(:all, :params => { 'article_id' => 5, :page => 2 }) -* Added find-one with symbol [DHH]. Example: Person.find(:one, :from => :leader) # => GET /people/leader.xml +* Added find-one with symbol [David Heinemeier Hansson]. Example: Person.find(:one, :from => :leader) # => GET /people/leader.xml -* BACKWARDS INCOMPATIBLE: Changed the finder API to be more extensible with :params and more strict usage of scopes [DHH]. Changes: +* BACKWARDS INCOMPATIBLE: Changed the finder API to be more extensible with :params and more strict usage of scopes [David Heinemeier Hansson]. Changes: Person.find(:all, :title => "CEO") ...becomes: Person.find(:all, :params => { :title => "CEO" }) Person.find(:managers) ...becomes: Person.find(:all, :from => :managers) Person.find("/companies/1/manager.xml") ...becomes: Person.find(:one, :from => "/companies/1/manager.xml") -* Add support for setting custom headers per Active Resource model [Rick] +* Add support for setting custom headers per Active Resource model [Rick Olson] class Project headers['X-Token'] = 'foo' @@ -106,13 +106,13 @@ # makes the GET request with the custom X-Token header Project.find(:all) -* Added find-by-path options to ActiveResource::Base.find [DHH]. Examples: +* Added find-by-path options to ActiveResource::Base.find [David Heinemeier Hansson]. Examples: employees = Person.find(:all, :from => "/companies/1/people.xml") # => GET /companies/1/people.xml manager = Person.find("/companies/1/manager.xml") # => GET /companies/1/manager.xml -* Added support for using classes from within a single nested module [DHH]. Example: +* Added support for using classes from within a single nested module [David Heinemeier Hansson]. Example: module Highrise class Note < ActiveResource::Base @@ -127,7 +127,7 @@ assert_kind_of Highrise::Comment, Note.find(1).comments.first -* Added load_attributes_from_response as a way of loading attributes from other responses than just create [DHH] +* Added load_attributes_from_response as a way of loading attributes from other responses than just create [David Heinemeier Hansson] class Highrise::Task < ActiveResource::Base def complete @@ -143,18 +143,18 @@ Person.find(:managers) # => GET /people/managers.xml Kase.find(1).post(:close) # => POST /kases/1/close.xml -* Remove explicit prefix_options parameter for ActiveResource::Base#initialize. [Rick] +* Remove explicit prefix_options parameter for ActiveResource::Base#initialize. [Rick Olson] ActiveResource splits the prefix_options from it automatically. -* Allow ActiveResource::Base.delete with custom prefix. [Rick] +* Allow ActiveResource::Base.delete with custom prefix. [Rick Olson] -* Add ActiveResource::Base#dup [Rick] +* Add ActiveResource::Base#dup [Rick Olson] -* Fixed constant warning when fetching the same object multiple times [DHH] +* Fixed constant warning when fetching the same object multiple times [David Heinemeier Hansson] -* Added that saves which get a body response (and not just a 201) will use that response to update themselves [DHH] +* Added that saves which get a body response (and not just a 201) will use that response to update themselves [David Heinemeier Hansson] -* Disregard namespaces from the default element name, so Highrise::Person will just try to fetch from "/people", not "/highrise/people" [DHH] +* Disregard namespaces from the default element name, so Highrise::Person will just try to fetch from "/people", not "/highrise/people" [David Heinemeier Hansson] * Allow array and hash query parameters. #7756 [Greg Spurrier] @@ -176,7 +176,7 @@ * Base#==, eql?, and hash methods. == returns true if its argument is identical to self or if it's an instance of the same class, is not new?, and has the same id. eql? is an alias for ==. hash delegates to id. [Jeremy Kemper] -* Allow subclassed resources to share the site info [Rick, Jeremy Kemper] +* Allow subclassed resources to share the site info [Rick Olson, Jeremy Kemper] d class BeastResource < ActiveResource::Base self.site = 'http://beast.caboo.se' @@ -259,4 +259,4 @@ d * Base.site= accepts URIs. 200...400 are valid response codes. PUT and POST request bodies default to ''. [Jeremy Kemper] -* Initial checkin: object-oriented client for restful HTTP resources which follow the Rails convention. [DHH] +* Initial checkin: object-oriented client for restful HTTP resources which follow the Rails convention. [David Heinemeier Hansson] diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 46081d11fb..bc29c41d7c 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -10,9 +10,9 @@ * Added ActiveSupport::OrderedHash#each_key and ActiveSupport::OrderedHash#each_value #1410 [Christoffer Sawicki] -* Added ActiveSupport::MessageVerifier and MessageEncryptor to aid users who need to store signed and/or encrypted messages. [Koz] +* Added ActiveSupport::MessageVerifier and MessageEncryptor to aid users who need to store signed and/or encrypted messages. [Michael Koziarski] -* Added ActiveSupport::BacktraceCleaner to cut down on backtrace noise according to filters and silencers [DHH] +* Added ActiveSupport::BacktraceCleaner to cut down on backtrace noise according to filters and silencers [David Heinemeier Hansson] * Added Object#try. ( Taken from http://ozmm.org/posts/try.html ) [Chris Wanstrath] @@ -31,7 +31,7 @@ * Fixed the option merging in Array#to_xml #1126 [Rudolf Gavlas] -* Make I18n::Backend::Simple reload its translations in development mode [DHH/Sven Fuchs] +* Make I18n::Backend::Simple reload its translations in development mode [David Heinemeier Hansson/Sven Fuchs] *2.2.0 [RC1] (October 24th, 2008)* @@ -42,7 +42,7 @@ * Time#advance recognizes fractional days and weeks. Deprecate Durations of fractional months and years #970 [Tom Lea] -* Add ActiveSupport::Rescuable module abstracting ActionController::Base rescue_from features. [Norbert Crombach, Pratik] +* Add ActiveSupport::Rescuable module abstracting ActionController::Base rescue_from features. [Norbert Crombach, Pratik Naik] * Switch from String#chars to String#mb_chars for the unicode proxy. [Manfred Stienstra] @@ -56,7 +56,7 @@ * Added Inflector#parameterize for easy slug generation ("Donald E. Knuth".parameterize => "donald-e-knuth") #713 [Matt Darby] -* Changed cache benchmarking to be reported in milliseconds [DHH] +* Changed cache benchmarking to be reported in milliseconds [David Heinemeier Hansson] * Fix Ruby's Time marshaling bug in pre-1.9 versions of Ruby: utc instances are now correctly unmarshaled with a utc zone instead of the system local zone [#900 state:resolved] [Luca Guidi, Geoff Buesing] @@ -72,7 +72,7 @@ * Move the test related core_ext stuff out of core_ext so it's only loaded by the test helpers. [Michael Koziarski] -* Add Inflection rules for String#humanize. #535 [dcmanges] +* Add Inflection rules for String#humanize. #535 [Dan Manges] ActiveSupport::Inflector.inflections do |inflect| inflect.human(/_cnt$/i, '\1_count') @@ -84,19 +84,19 @@ * Added TimeZone #=~, to support matching zones by regex in time_zone_select. #195 [Ernie Miller] -* Added Array#second through Array#fifth as aliases for Array#[1] through Array#[4] + Array#forty_two as alias for Array[41] [DHH] +* Added Array#second through Array#fifth as aliases for Array#[1] through Array#[4] + Array#forty_two as alias for Array[41] [David Heinemeier Hansson] * Added test/do declaration style testing to ActiveSupport::TestCase [DHH via Jay Fields] -* Added Object#present? which is equivalent to !Object#blank? [DHH] +* Added Object#present? which is equivalent to !Object#blank? [David Heinemeier Hansson] -* Added Enumberable#many? to encapsulate collection.size > 1 [DHH/Damian Janowski] +* Added Enumberable#many? to encapsulate collection.size > 1 [David Heinemeier Hansson/Damian Janowski] * Add more standard Hash methods to ActiveSupport::OrderedHash [Steve Purcell] * Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ActiveSupport [Josh Peek] -* Added StringInquirer for doing things like StringInquirer.new("production").production? # => true and StringInquirer.new("production").development? # => false [DHH] +* Added StringInquirer for doing things like StringInquirer.new("production").production? # => true and StringInquirer.new("production").development? # => false [David Heinemeier Hansson] * Fixed Date#end_of_quarter to not blow up on May 31st [#289 state:resolved] (Danger) @@ -133,7 +133,7 @@ * TimeWithZone respects config.active_support.use_standard_json_time_format [Geoff Buesing] -* Add config.active_support.escape_html_entities_in_json to allow disabling of html entity escaping. [rick] +* Add config.active_support.escape_html_entities_in_json to allow disabling of html entity escaping. [Rick Olson] * Improve documentation. [Xavier Noria] @@ -145,7 +145,7 @@ * TimeWithZone#method_missing: send to utc to advance with dst correctness, otherwise send to time. Adding tests for time calculations methods [Geoff Buesing] -* Add config.active_support.use_standard_json_time_format setting so that Times and Dates export to ISO 8601 dates. [rick] +* Add config.active_support.use_standard_json_time_format setting so that Times and Dates export to ISO 8601 dates. [Rick Olson] * TZInfo: Removing unneeded TimezoneProxy class [Geoff Buesing] @@ -163,9 +163,9 @@ * TimeWithZone#usec returns 0 instead of error when DateTime is wrapped [Geoff Buesing] -* Improve documentation. [Radar, Jan De Poorter, chuyeow, xaviershay, danger, miloops, Xavier Noria, Sunny Ripert] +* Improve documentation. [Ryan Bigg, Jan De Poorter, Cheah Chu Yeow, Xavier Shay, Jack Danger Canty, Emilio Tagua, Xavier Noria, Sunny Ripert] -* Ensure that TimeWithZone#to_yaml works when passed a YAML::Emitter. [rick] +* Ensure that TimeWithZone#to_yaml works when passed a YAML::Emitter. [Rick Olson] * Ensure correct TimeWithZone#to_date [Geoff Buesing] @@ -197,7 +197,7 @@ * Adding TimeWithZone #marshal_dump and #marshal_load [Geoff Buesing] -* Add OrderedHash#to_hash [josh] +* Add OrderedHash#to_hash [Josh Peek] * Adding Time#end_of_day, _quarter, _week, and _year. #9312 [Juanjo Bazan, Tarmo Tänav, BigTitus] @@ -207,9 +207,9 @@ * TimeWithZone #+ and #- behave consistently with numeric arguments regardless of whether wrapped time is a Time or DateTime; consistenty answers false to #acts_like?(:date) [Geoff Buesing] -* Add String#squish and String#squish! to remove consecutive chunks of whitespace. #11123 [jordi, Henrik N] +* Add String#squish and String#squish! to remove consecutive chunks of whitespace. #11123 [Jordi Bunster, Henrik N] -* Serialize BigDecimals as Floats when using to_yaml. #8746 [ernesto.jimenez] +* Serialize BigDecimals as Floats when using to_yaml. #8746 [Ernesto Jimenez] * Adding TimeWithZone #to_yaml, #to_datetime, #eql? and method aliases for duck-typing compatibility with Time [Geoff Buesing] @@ -227,7 +227,7 @@ * TimeZone#new method renamed #local; when used with Time.zone, constructor now reads: Time.zone.local() [Geoff Buesing] -* Added Base64.encode64s to encode values in base64 without the newlines. This makes the values immediately usable as URL parameters or memcache keys without further processing [DHH] +* Added Base64.encode64s to encode values in base64 without the newlines. This makes the values immediately usable as URL parameters or memcache keys without further processing [David Heinemeier Hansson] * Remove :nodoc: entries around the ActiveSupport test/unit assertions. #10946 [dancroak, jamesh] @@ -235,7 +235,7 @@ * cache.fetch(key, :force => true) to force a cache miss. [Jeremy Kemper] -* Support retrieving TimeZones with a Duration. TimeZone[-28800] == TimeZone[-480.minutes]. [rick] +* Support retrieving TimeZones with a Duration. TimeZone[-28800] == TimeZone[-480.minutes]. [Rick Olson] * TimeWithZone#- added, so that #- can handle a Time or TimeWithZone argument correctly [Geoff Buesing] @@ -283,21 +283,21 @@ * TestCase: introduce declared setup and teardown callbacks. Pass a list of methods and an optional block to call before setup or after teardown. Setup callbacks are run in the order declared; teardown callbacks are run in reverse. [Jeremy Kemper] -* Added ActiveSupport::Gzip.decompress/compress(source) as an easy wrapper for Zlib [Tobias Luetke] +* Added ActiveSupport::Gzip.decompress/compress(source) as an easy wrapper for Zlib [Tobias Lütke] * Included MemCache-Client to make the improved ActiveSupport::Cache::MemCacheStore work out of the box [Bob Cottrell, Eric Hodel] -* Added ActiveSupport::Cache::* framework as an extraction from ActionController::Caching::Fragments::* [DHH] +* Added ActiveSupport::Cache::* framework as an extraction from ActionController::Caching::Fragments::* [David Heinemeier Hansson] * Fixed String#titleize to work for strings with 's too #10571 [trek] -* Changed the implementation of Enumerable#group_by to use a double array approach instead of a hash such that the insert order is honored [DHH/Marcel] +* Changed the implementation of Enumerable#group_by to use a double array approach instead of a hash such that the insert order is honored [David Heinemeier Hansson/Marcel Molina Jr.] -* remove multiple enumerations from ActiveSupport::JSON#convert_json_to_yaml when dealing with date/time values. [rick] +* remove multiple enumerations from ActiveSupport::JSON#convert_json_to_yaml when dealing with date/time values. [Rick Olson] * Hash#symbolize_keys skips keys that can't be symbolized. #10500 [Brad Greenlee] -* Ruby 1.9 compatibility. #1689, #10466, #10468, #10554, #10594, #10632 [Cheah Chu Yeow, Pratik Naik, Jeremy Kemper, Dirkjan Bussink, fxn] +* Ruby 1.9 compatibility. #1689, #10466, #10468, #10554, #10594, #10632 [Cheah Chu Yeow, Pratik Naik, Jeremy Kemper, Dirkjan Bussink, Xavier Noria] * TimeZone#to_s uses UTC rather than GMT. #1689 [Cheah Chu Yeow] @@ -308,7 +308,7 @@ *2.0.1* (December 7th, 2007) -* Added Array#from and Array#to that behaves just from String#from and String#to [DHH] +* Added Array#from and Array#to that behaves just from String#from and String#to [David Heinemeier Hansson] * Fix that empty collections should be treated as empty arrays regardless of whitespace for Hash#from_xml #10255 [adamj] @@ -316,17 +316,17 @@ * Change Time and DateTime #end_of_month to return last second of month instead of beginning of last day of month. Closes #10200 [Geoff Buesing] -* Speedup String#blank? [Jeremy Kemper, Koz] +* Speedup String#blank? [Jeremy Kemper, Michael Koziarski] * Add documentation for Hash#diff. Closes #9306 [Tarmo Tänav] -* Add new superclass_delegating_accessors. Similar to class inheritable attributes but with subtly different semantics. [Koz, Tarmo Tänav] +* Add new superclass_delegating_accessors. Similar to class inheritable attributes but with subtly different semantics. [Michael Koziarski, Tarmo Tänav] * Change JSON to encode %w(< > &) as 4 digit hex codes to be in compliance with the JSON spec. Closes #9975 [Josh Peek, Cheah Chu Yeow, Tim Pope] -* Fix JSON encoding/decoding bugs dealing with /'s. Closes #9990 [Rick, theamazingrando] +* Fix JSON encoding/decoding bugs dealing with /'s. Closes #9990 [Rick Olson, theamazingrando] -* Introduce a base class for all test cases used by rails applications. ActiveSupport::TestCase [Koz] +* Introduce a base class for all test cases used by rails applications. ActiveSupport::TestCase [Michael Koziarski] The intention is to use this to reduce the amount of monkeypatching / overriding that is done to test/unit's classes. @@ -379,13 +379,13 @@ * Backport Object#instance_variable_defined? for Ruby < 1.8.6. [Jeremy Kemper] -* BufferedLogger#add converts the message to a string. #9702, #9724 [eigentone, DrMark, tomafro] +* BufferedLogger#add converts the message to a string. #9702, #9724 [eigentone, DrMark, Tom Ward] -* Added ActiveSupport::BufferedLogger as a duck-typing alternative (albeit with no formatter) to the Ruby Logger, which provides a very nice speed bump (inspired by Ezra's buffered logger) [DHH] +* Added ActiveSupport::BufferedLogger as a duck-typing alternative (albeit with no formatter) to the Ruby Logger, which provides a very nice speed bump (inspired by Ezra's buffered logger) [David Heinemeier Hansson] * Object#instance_exec produces fewer garbage methods. [Mauricio Fernandez] -* Decode json strings as Dates/Times if they're using a YAML-compatible format. Closes #9614 [Rick] +* Decode json strings as Dates/Times if they're using a YAML-compatible format. Closes #9614 [Rick Olson] * Fixed cache_page to use the request url instead of the routing options when picking a save path. #8614 [Josh Peek] @@ -393,11 +393,11 @@ * Fixed that pluralizing an empty string should return the same empty string, not "s". #7720 [Josh Peek] -* Added call to inspect on non-string classes for the logger #8533 [codahale] +* Added call to inspect on non-string classes for the logger #8533 [Coda Hale] * Deprecation: remove deprecated :mday option from Time, Date, and DateTime#change. [Jeremy Kemper] -* Fix JSON decoder with nested quotes and commas. #9579 [zdennis] +* Fix JSON decoder with nested quotes and commas. #9579 [Zach Dennis] * Hash#to_xml doesn't double-unescape. #8806 [Ezran] @@ -409,27 +409,27 @@ * Deprecation: removed Reloadable. [Jeremy Kemper] -* Make the utf-handler return the correct value for non-matching regular expressions. Closes #9049 [manfred] +* Make the utf-handler return the correct value for non-matching regular expressions. Closes #9049 [Manfred Stienstra] -* Add ljust, rjust and center to utf8-handler. Closes #9165 [manfred] +* Add ljust, rjust and center to utf8-handler. Closes #9165 [Manfred Stienstra] -* Fix Time#advance bug when trying to advance a year from leap day. Closes #8655 [gbuesing] +* Fix Time#advance bug when trying to advance a year from leap day. Closes #8655 [Geoff Buesing] -* Add support for []= on ActiveSupport::Multibyte::Chars. Closes #9142. [ewan, manfred] +* Add support for []= on ActiveSupport::Multibyte::Chars. Closes #9142. [ewan, Manfred Stienstra] * Added Array#extract_options! to encapsulate the pattern of getting an options hash out of a variable number of parameters. #8759 [Norbert Crombach] * Let alias_attribute work with attributes with initial capital letters (legacy columns etc). Closes #8596 [mpalmer] -* Added Hash#except which is the inverse of Hash#slice -- return the hash except the keys that are specified [DHH] +* Added Hash#except which is the inverse of Hash#slice -- return the hash except the keys that are specified [David Heinemeier Hansson] -* Added support for pluralization with a different starting letter than the singular version (cow/kine) #4929 [norri_b/hasmanyjosh] +* Added support for pluralization with a different starting letter than the singular version (cow/kine) #4929 [norri_b/Josh Susser] * Demote Hash#to_xml to use XmlSimple#xml_in_string so it can't read files or stdin. #8453 [candlerb, Jeremy Kemper] -* Backport clean_logger changes to support ruby 1.8.2 [mislav] +* Backport clean_logger changes to support ruby 1.8.2 [Mislav Marohnić] -* Added proper handling of arrays #8537 [hasmanyjosh] +* Added proper handling of arrays #8537 [Josh Susser] Before: Hash.from_xml '<images></images>' @@ -463,7 +463,7 @@ * Move common DateTime calculations to Date. #8536 [Geoff Buesing] -* Added Date#change (like Time#change) [DHH] +* Added Date#change (like Time#change) [David Heinemeier Hansson] * DateTime#to_time converts to Time unless out of range. #8512 [Geoff Buesing] @@ -471,7 +471,7 @@ * Time durations use since instead of + for accuracy. #8513 [Geoff Buesing] -* escape <'s and >'s in JSON strings. #8371 [Rick] +* escape <'s and >'s in JSON strings. #8371 [Rick Olson] * Inflections: MatrixTest -> MatrixTests instead of MatricesTest. #8496 [jbwiv] @@ -487,11 +487,11 @@ * Simplify API of assert_difference by passing in an expression that is evaluated before and after the passed in block. See documenation for examples of new API. [Marcel Molina Jr.] -* Added assert_difference and assert_no_difference to test/unit assertions [Tobias Luetke] +* Added assert_difference and assert_no_difference to test/unit assertions [Tobias Lütke] -* Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [DHH] +* Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [David Heinemeier Hansson] -* Added parsing of file type in Hash.xml_in so you can easily do file uploads with base64 from an API [DHH] +* Added parsing of file type in Hash.xml_in so you can easily do file uploads with base64 from an API [David Heinemeier Hansson] <person> <name>David</name> @@ -511,9 +511,9 @@ * Use XSD-compatible type names for Hash#to_xml and make the converters extendable #8047 [Tim Pope] -* Added yielding of builder in Hash#to_xml [DHH] +* Added yielding of builder in Hash#to_xml [David Heinemeier Hansson] -* Hash#with_indifferent_access now also converts hashes kept in arrays to indifferent access (makes it easier to treat HTML and XML parameters the same) [DHH] +* Hash#with_indifferent_access now also converts hashes kept in arrays to indifferent access (makes it easier to treat HTML and XML parameters the same) [David Heinemeier Hansson] * Hash#to_xml supports YAML attributes. #7502 [jonathan] @@ -531,9 +531,9 @@ * Give DateTime correct .to_s implementations, lets it play nice with ActiveRecord quoting. #7649 [Geoff Buesing] -* Add File.atomic_write, allows you to write large files in an atomic manner, preventing users from seeing half written files. [Koz] +* Add File.atomic_write, allows you to write large files in an atomic manner, preventing users from seeing half written files. [Michael Koziarski] -* Allow users to provide custom formatters to Logger. [aeden] +* Allow users to provide custom formatters to Logger. [Anthony Eden] * Hash#to_query CGI-escapes its keys. [Jeremy Kemper] @@ -542,7 +542,7 @@ * :db format for Date#to_s [Jeremy Kemper] Date.new(2007, 1, 27).to_s(:db) # => '2007-01-27' -* Added :instance_writer option to #mattr_writer/accessor, #cattr_writer/accessor, and #class_inheritable_writer to skip the creation of the instance writer. [Rick] +* Added :instance_writer option to #mattr_writer/accessor, #cattr_writer/accessor, and #class_inheritable_writer to skip the creation of the instance writer. [Rick Olson] * Added Hash#to_query to turn a hash of values into a form-encoded query string [Nicholas Seckar] @@ -577,7 +577,7 @@ public for compatibility. [Jeremy Kemper] * Optimize Class Inheritable Attributes so that unnecessary hashes are not created. Closes #7472 [Bruce Perens] -* Added :instance_writer option to #mattr_writer/accessor, #cattr_writer/accessor, and #class_inheritable_writer to skip the creation of the instance writer. [Rick] +* Added :instance_writer option to #mattr_writer/accessor, #cattr_writer/accessor, and #class_inheritable_writer to skip the creation of the instance writer. [Rick Olson] * Full test coverage for Inflector. #7228 [Dan Kubb] @@ -602,13 +602,13 @@ public for compatibility. [Jeremy Kemper] * Fixed Array#to_xml when it contains a series of hashes (each piece would get its own XML declaration) #6610 [thkarcher/cyu] -* Added Time#to_s(:time) which will just return H:M, like 17:44 [DHH] +* Added Time#to_s(:time) which will just return H:M, like 17:44 [David Heinemeier Hansson] * Add Module#attr_accessor_with_default to initialize value of attribute before setting it. Closes #6538. [Stuart Halloway, Marcel Molina Jr.] -* Hash#to_xml handles keys with the same name as Kernel methods. #6613 [Catfish] +* Hash#to_xml handles keys with the same name as Kernel methods. #6613 [Jonathan del Strother] -* Added Time#end_of_day to get 23:59:59 of that day [DHH] +* Added Time#end_of_day to get 23:59:59 of that day [David Heinemeier Hansson] * Don't quote hash keys in Hash#to_json if they're valid JavaScript identifiers. Disable this with ActiveSupport::JSON.unquote_hash_key_identifiers = false if you need strict JSON compliance. [Sam Stephenson] @@ -618,11 +618,11 @@ public for compatibility. [Jeremy Kemper] * Fix unicode JSON regexp for Onigurama compatibility. #6494 [whitley] -* update XmlSimple to 1.0.10. Closes #6532. [nicksieger] +* update XmlSimple to 1.0.10. Closes #6532. [Nick Sieger] * Update dependencies to allow constants to be defined alongside their siblings. A common case for this is AR model classes with STI; user.rb might define User, Administrator and Guest for example. [Nicholas Seckar] -* next_week respects DST changes. #6483, #5617, #2353, #2509, #4551 [marclove, rabiedenharn, rails@roetzel.de, jsolson@damogran.org, drbrain@segment7.net] +* next_week respects DST changes. #6483, #5617, #2353, #2509, #4551 [marclove, Rob Biedenharn, rails@roetzel.de, jsolson@damogran.org, drbrain@segment7.net] * Expose methods added to Enumerable in the documentation, such as group_by. Closes #6170. [sergeykojin@gmail.com, Marcel Molina Jr.] @@ -642,9 +642,9 @@ public for compatibility. [Jeremy Kemper] * Hash#to_xml supports Bignum and BigDecimal. #6313 [edibiase] -* Don't undefine #class in OptionMerger [Rick] +* Don't undefine #class in OptionMerger [Rick Olson] -* Hash.create_from_xml has been renamed to Hash.from_xml, alias will exist until Rails 2.0 [DHH] +* Hash.create_from_xml has been renamed to Hash.from_xml, alias will exist until Rails 2.0 [David Heinemeier Hansson] * alias_method_chain works with accessor= methods also. #6153 [Caio Chassot] @@ -696,13 +696,13 @@ public for compatibility. [Jeremy Kemper] self.attr_internal_naming_format = '@%s__rofl' attr_internal :foo -* Raise fully qualified names upon name errors. #5533 [lars@pinds.com, Nicholas Seckar] +* Raise fully qualified names upon name errors. #5533 [Lars Pind, Nicholas Seckar] * Add extention to obtain the missing constant from NameError instances. [Nicholas Seckar] * Thoroughly document inflections. #5700 [petermichaux@gmail.com] -* Added Module#alias_attribute [Jamis/DHH]. Example: +* Added Module#alias_attribute [Jamis/David Heinemeier Hansson]. Example: class Content < ActiveRecord::Base # has a title attribute @@ -724,23 +724,23 @@ public for compatibility. [Jeremy Kemper] Provide your own per-environment in e.g. config/environments/development.rb: ActiveSupport::Deprecation.behavior = Proc.new { |message| raise message } -* First cut of the Rails Deprecation system. [Koz] +* First cut of the Rails Deprecation system. [Michael Koziarski] * Strip boolean XML content before checking for 'true' [Rick Olson] -* Customize default BigDecimal formatting. References #5672 [dave@pragprog.com] +* Customize default BigDecimal formatting. References #5672 [Dave Thomas] -* Correctly convert <foo nil="true"> to nil when using Hash.create_from_xml. [Rick] +* Correctly convert <foo nil="true"> to nil when using Hash.create_from_xml. [Rick Olson] * Optional identity for Enumerable#sum defaults to zero. #5657 [gensym@mac.com] -* HashWithIndifferentAccess shouldn't confuse false and nil. #5601 [shugo@ruby-lang.org] +* HashWithIndifferentAccess shouldn't confuse false and nil. #5601 [Shugo Maeda] * Fixed HashWithIndifferentAccess#default #5586 [chris@seagul.co.uk] * More compatible Hash.create_from_xml. #5523 [nunemaker@gmail.com] -* Added Enumerable#sum for calculating a sum from the elements [DHH, jonathan@daikini.com]. Examples: +* Added Enumerable#sum for calculating a sum from the elements [David Heinemeier Hansson, jonathan@daikini.com]. Examples: [1, 2, 3].sum payments.sum { |p| p.price * p.tax_rate } @@ -762,7 +762,7 @@ public for compatibility. [Jeremy Kemper] {1 => "one", 2 => "two", 3 => "three"}.sort_by(&:first).map(&:last) #=> ["one", "two", "three"] -* Added Hash.create_from_xml(string) which will create a hash from a XML string and even typecast if possible [DHH]. Example: +* Added Hash.create_from_xml(string) which will create a hash from a XML string and even typecast if possible [David Heinemeier Hansson]. Example: Hash.create_from_xml <<-EOT <note> @@ -775,7 +775,7 @@ public for compatibility. [Jeremy Kemper] { :note => { :title => "This is a note", :created_at => Date.new(2004, 10, 10) } } -* Added Jim Weirich's excellent FlexMock class to vendor (Copyright 2003, 2004 by Jim Weirich (jim@weriichhouse.org)) -- it's not automatically required, though, so require 'flexmock' is still necessary [DHH] +* Added Jim Weirich's excellent FlexMock class to vendor (Copyright 2003, 2004 by Jim Weirich (jim@weriichhouse.org)) -- it's not automatically required, though, so require 'flexmock' is still necessary [David Heinemeier Hansson] * Fixed that Module#alias_method_chain should work with both foo? foo! and foo at the same time #4954 [anna@wota.jp] @@ -783,13 +783,13 @@ public for compatibility. [Jeremy Kemper] * Add OrderedHash#values. [Sam Stephenson] -* Added Array#to_s(:db) that'll produce a comma-separated list of ids [DHH]. Example: +* Added Array#to_s(:db) that'll produce a comma-separated list of ids [David Heinemeier Hansson]. Example: Purchase.find(:all, :conditions => "product_id IN (#{shops.products.to_s(:db)})" * Normalize classify's argument to a String so that it plays nice with Symbols. [Marcel Molina Jr.] -* Strip out leading schema name in classify. References #5139. [schoenm@earthlink.net] +* Strip out leading schema name in classify. References #5139. [Michael Schoen] * Remove Enumerable#first_match since break(value) handles the use case well enough. [Nicholas Seckar] @@ -821,7 +821,7 @@ public for compatibility. [Jeremy Kemper] * Added Module#alias_method_chain [Jamis Buck] -* Updated to Builder 2.0 [DHH] +* Updated to Builder 2.0 [David Heinemeier Hansson] * Add Array#split for dividing arrays into one or more subarrays by value or block. [Sam Stephenson] @@ -852,7 +852,7 @@ public for compatibility. [Jeremy Kemper] * Added Fixnum#seconds for consistency, so you can say 5.minutes + 30.seconds instead of 5.minutes + 30 #4389 [François Beausoleil] -* Added option to String#camelize to generate lower-cased camel case by passing in :lower, like "super_man".camelize(:lower) # => "superMan" [DHH] +* Added option to String#camelize to generate lower-cased camel case by passing in :lower, like "super_man".camelize(:lower) # => "superMan" [David Heinemeier Hansson] * Added Hash#diff to show the difference between two hashes [Chris McGrath] @@ -860,12 +860,12 @@ public for compatibility. [Jeremy Kemper] * Enhance Inflector.underscore to convert '-' into '_' (as the inverse of Inflector.dasherize) [Jamis Buck] -* Switched to_xml to use the xml schema format for datetimes. This allows the encoding of time zones and should improve operability. [Koz] +* Switched to_xml to use the xml schema format for datetimes. This allows the encoding of time zones and should improve operability. [Michael Koziarski] * Added a note to the documentation for the Date related Numeric extensions to indicate that they're -approximations and shouldn't be used for critical calculations. [Koz] +approximations and shouldn't be used for critical calculations. [Michael Koziarski] -* Added Hash#to_xml and Array#to_xml that makes it much easier to produce XML from basic structures [DHH]. Examples: +* Added Hash#to_xml and Array#to_xml that makes it much easier to produce XML from basic structures [David Heinemeier Hansson]. Examples: { :name => "David", :street_name => "Paulina", :age => 26, :moved_on => Date.new(2005, 11, 15) }.to_xml @@ -878,7 +878,7 @@ approximations and shouldn't be used for critical calculations. [Koz] <moved-on type="date">2005-11-15</moved-on> </person> -* Moved Jim Weirich's wonderful Builder from Action Pack to Active Support (it's simply too useful to be stuck in AP) [DHH] +* Moved Jim Weirich's wonderful Builder from Action Pack to Active Support (it's simply too useful to be stuck in AP) [David Heinemeier Hansson] * Fixed that Array#to_sentence will return "" on an empty array instead of ", and" #3842, #4031 [rubyonrails@beautifulpixel.com] @@ -907,7 +907,7 @@ approximations and shouldn't be used for critical calculations. [Koz] [Marcel Molina Jr., Sam Stephenson] -* Added Kernel#daemonize to turn the current process into a daemon that can be killed with a TERM signal [DHH] +* Added Kernel#daemonize to turn the current process into a daemon that can be killed with a TERM signal [David Heinemeier Hansson] * Add 'around' methods to Logger, to make it easy to log before and after messages for a given block as requested in #3809. [Michael Koziarski] Example: @@ -922,7 +922,7 @@ approximations and shouldn't be used for critical calculations. [Koz] * Make String#last return the string instead of nil when it is shorter than the limit [Scott Barron]. -* Added delegation support to Module that allows multiple delegations at once (unlike Forwardable in the stdlib) [DHH]. Example: +* Added delegation support to Module that allows multiple delegations at once (unlike Forwardable in the stdlib) [David Heinemeier Hansson]. Example: class Account < ActiveRecord::Base has_one :subscription @@ -957,7 +957,7 @@ approximations and shouldn't be used for critical calculations. [Koz] include Reloadable end - Reloading a class is done by removing its constant which will cause it to be loaded again on the next reference. [DHH] + Reloading a class is done by removing its constant which will cause it to be loaded again on the next reference. [David Heinemeier Hansson] * Added auto-loading support for classes in modules, so Conductor::Migration will look for conductor/migration.rb and Conductor::Database::Settings will look for conductor/database/settings.rb [Nicholas Seckar] @@ -965,7 +965,7 @@ approximations and shouldn't be used for critical calculations. [Koz] * Add Proc#bind(object) for changing a proc or block's self by returning a Method bound to the given object. Based on why the lucky stiff's "cloaker" method. [Sam Stephenson] -* Fix merge and dup for hashes with indifferent access #3404 [kenneth.miller@bitfield.net] +* Fix merge and dup for hashes with indifferent access #3404 [Ken Miller] * Fix the requires in option_merger_test to unbreak AS tests. [Sam Stephenson] @@ -1072,7 +1072,7 @@ approximations and shouldn't be used for critical calculations. [Koz] * Fixed clean logger to work with Ruby 1.8.3 Logger class #2245 -* Fixed memory leak with Active Record classes when Dependencies.mechanism = :load #1704 [c.r.mcgrath@gmail.com] +* Fixed memory leak with Active Record classes when Dependencies.mechanism = :load #1704 [Chris McGrath] * Fixed Inflector.underscore for use with acronyms, so HTML becomes html instead of htm_l #2173 [k@v2studio.com] @@ -1082,11 +1082,11 @@ approximations and shouldn't be used for critical calculations. [Koz] * Added Hash#reverse_merge, Hash#reverse_merge!, and Hash#reverse_update to ease the use of default options -* Added Array#to_sentence that'll turn ['one', 'two', 'three'] into "one, two, and three" #2157 [m.stienstra@fngtps.com] +* Added Array#to_sentence that'll turn ['one', 'two', 'three'] into "one, two, and three" #2157 [Manfred Stienstra] * Added Kernel#silence_warnings to turn off warnings temporarily for the passed block -* Added String#starts_with? and String#ends_with? #2118 [thijs@vandervossen.net] +* Added String#starts_with? and String#ends_with? #2118 [Thijs van der Vossen] * Added easy extendability to the inflector through Inflector.inflections (using the Inflector::Inflections singleton class). Examples: @@ -1129,7 +1129,7 @@ approximations and shouldn't be used for critical calculations. [Koz] * Added new rules to the Inflector to deal with more unusual plurals mouse/louse => mice/lice, information => information, ox => oxen, virus => viri, archive => archives #1571, #1583, #1490, #1599, #1608 [foamdino@gmail.com/others] -* Fixed memory leak with Object#remove_subclasses_of, which inflicted a Rails application running in development mode with a ~20KB leak per request #1289 [c.r.mcgrath@gmail.com] +* Fixed memory leak with Object#remove_subclasses_of, which inflicted a Rails application running in development mode with a ~20KB leak per request #1289 [Chris McGrath] * Made 1.year == 365.25.days to account for leap years. This allows you to do User.find(:all, :conditions => ['birthday > ?', 50.years.ago]) without losing a lot of days. #1488 [tuxie@dekadance.se] @@ -1164,7 +1164,7 @@ approximations and shouldn't be used for critical calculations. [Koz] * Fixed that in some circumstances controllers outside of modules may have hidden ones inside modules. For example, admin/content might have been hidden by /content. #1075 [Nicholas Seckar] -* Fixed inflection of perspectives and similar words #1045 [thijs@vandervossen.net] +* Fixed inflection of perspectives and similar words #1045 [Thijs van der Vossen] * Added Fixnum#even? and Fixnum#odd? @@ -1206,7 +1206,7 @@ approximations and shouldn't be used for critical calculations. [Koz] * Added inflection rules for "sh" words, like "wish" and "fish" #755 [phillip@pjbsoftware.com] -* Fixed an exception when using Ajax based requests from Safari because Safari appends a \000 to the post body. Symbols can't have \000 in them so indifferent access would throw an exception in the constructor. Indifferent hashes now use strings internally instead. #746 [Tobias Luetke] +* Fixed an exception when using Ajax based requests from Safari because Safari appends a \000 to the post body. Symbols can't have \000 in them so indifferent access would throw an exception in the constructor. Indifferent hashes now use strings internally instead. #746 [Tobias Lütke] * Added String#to_time and String#to_date for wrapping ParseDate @@ -1272,7 +1272,7 @@ approximations and shouldn't be used for critical calculations. [Koz] * Added Inflections as an extension on String, so Inflector.pluralize(Inflector.classify(name)) becomes name.classify.pluralize #476 [Jeremy Kemper] -* Added Byte operations to Numeric, so 5.5.megabytes + 200.kilobytes #461 [Marcel Molina] +* Added Byte operations to Numeric, so 5.5.megabytes + 200.kilobytes #461 [Marcel Molina Jr.] * Fixed that Dependencies.reload can't load the same file twice #420 [Kent Sibilev] diff --git a/activesupport/lib/active_support/core_ext/float/rounding.rb b/activesupport/lib/active_support/core_ext/float/rounding.rb index fe89d11323..062d466838 100644 --- a/activesupport/lib/active_support/core_ext/float/rounding.rb +++ b/activesupport/lib/active_support/core_ext/float/rounding.rb @@ -12,9 +12,9 @@ module ActiveSupport #:nodoc: # Rounds the float with the specified precision. # # x = 1.337 - # x.round_with_precision # => 1 - # x.round_with_precision(1) # => 1.3 - # x.round_with_precision(2) # => 1.34 + # x.round # => 1 + # x.round(1) # => 1.3 + # x.round(2) # => 1.34 def round_with_precision(precision = nil) precision.nil? ? round_without_precision : (self * (10 ** precision)).round / (10 ** precision).to_f end diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 9ce7b6349c..b313f082a3 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,6 +1,6 @@ *2.3.0 [Edge]* -* Add a rake task to apply a template to an existing application : rake rails:template LOCATION=~/template.rb [Pratik] +* Add a rake task to apply a template to an existing application : rake rails:template LOCATION=~/template.rb [Pratik Naik] * Add "-m/--template" option to Rails generator to apply a template to the generated application. [Jeremy McAnally] @@ -45,31 +45,31 @@ rails <application name> --template=http://gist.github.com/31208.txt -* Extracted the process scripts (inspector, reaper, spawner) into the plugin irs_process_scripts [DHH] +* Extracted the process scripts (inspector, reaper, spawner) into the plugin irs_process_scripts [David Heinemeier Hansson] * Changed Rails.root to return a Pathname object (allows for Rails.root.join('app', 'controllers') => "#{RAILS_ROOT}/app/controllers") #1482 [Damian Janowski/?] -* Added view path support for engines [DHH] +* Added view path support for engines [David Heinemeier Hansson] -* Added that config/routes.rb files in engine plugins are automatically loaded (and reloaded when they change in dev mode) [DHH] +* Added that config/routes.rb files in engine plugins are automatically loaded (and reloaded when they change in dev mode) [David Heinemeier Hansson] -* Added app/[models|controllers|helpers] to the load path for plugins that has an app directory (go engines ;)) [DHH] +* Added app/[models|controllers|helpers] to the load path for plugins that has an app directory (go engines ;)) [David Heinemeier Hansson] * Add config.preload_frameworks to load all frameworks at startup. Default to false so Rails autoloads itself as it's used. Turn this on for Passenger and JRuby. Also turned on by config.threadsafe! [Jeremy Kemper] -* Add a rake task to generate dispatchers : rake rails:generate_dispatchers [Pratik] +* Add a rake task to generate dispatchers : rake rails:generate_dispatchers [Pratik Naik] * "rails <app>" will not generate public/dispatch.cgi/fcgi/rb files by default now. Please use "--with-dispatchers" option if you need them. [Yaroslav Markin, Pratik Naik] * Added rake rails:update:application_controller to renamed application.rb to application_controller.rb -- included in rake rails:update so upgrading to 2.3 will automatically trigger it #1439 [kastner] -* Added Rails.backtrace_cleaner as an accessor for the Rails::BacktraceCleaner instance used by the framework to cut down on backtrace noise and config/initializers/backtrace_silencers.rb to add your own (or turn them all off) [DHH] +* Added Rails.backtrace_cleaner as an accessor for the Rails::BacktraceCleaner instance used by the framework to cut down on backtrace noise and config/initializers/backtrace_silencers.rb to add your own (or turn them all off) [David Heinemeier Hansson] * Switch from Test::Unit::TestCase to ActiveSupport::TestCase. [Jeremy Kemper] -* Added config.i18n settings gatherer to config/environment, auto-loading of all locales in config/locales/*.rb,yml, and config/locales/en.yml as a sample locale [DHH] +* Added config.i18n settings gatherer to config/environment, auto-loading of all locales in config/locales/*.rb,yml, and config/locales/en.yml as a sample locale [David Heinemeier Hansson] -* BACKWARDS INCOMPATIBLE: Renamed application.rb to application_controller.rb and removed all the special casing that was in place to support the former. You must do this rename in your own application when you upgrade to this version [DHH] +* BACKWARDS INCOMPATIBLE: Renamed application.rb to application_controller.rb and removed all the special casing that was in place to support the former. You must do this rename in your own application when you upgrade to this version [David Heinemeier Hansson] *2.2.1 [RC2] (November 14th, 2008)* @@ -110,9 +110,9 @@ * Plugins check for the gem init path (rails/init.rb) before the standard plugin init path (init.rb) [Jacek Becela] -* Changed all generated tests to use the test/do declaration style [DHH] +* Changed all generated tests to use the test/do declaration style [David Heinemeier Hansson] -* Wrapped Rails.env in StringInquirer so you can do Rails.env.development? [DHH] +* Wrapped Rails.env in StringInquirer so you can do Rails.env.development? [David Heinemeier Hansson] * Fixed that RailsInfoController wasn't considering all requests local in development mode (Edgard Castro) [#310 state:resolved] @@ -127,13 +127,13 @@ * Rails Edge info returns the latest git commit hash [Francesc Esplugas] -* Added Rails.public_path to control where HTML and assets are expected to be loaded from (defaults to Rails.root + "/public") #11581 [nicksieger] +* Added Rails.public_path to control where HTML and assets are expected to be loaded from (defaults to Rails.root + "/public") #11581 [Nick Sieger] * rake time:zones:local finds correct base utc offset for zones in the Southern Hemisphere [Geoff Buesing] -* Don't require rails/gem_builder during rails initialization, it's only needed for the gems:build task. [rick] +* Don't require rails/gem_builder during rails initialization, it's only needed for the gems:build task. [Rick Olson] -* script/performance/profiler compatibility with the ruby-prof >= 0.5.0. Closes #9176. [Catfish] +* script/performance/profiler compatibility with the ruby-prof >= 0.5.0. Closes #9176. [Jonathan del Strother] * Flesh out rake gems:unpack to unpack all gems, and add rake gems:build for native extensions. #11513 [ddollar] @@ -143,11 +143,11 @@ rake gems:build # builds all unpacked gems rake gems:build GEM=mygem # builds only the gem 'mygem' -* Add config.active_support for future configuration options. Also, add more new Rails 3 config settings to new_rails_defaults.rb [rick] +* Add config.active_support for future configuration options. Also, add more new Rails 3 config settings to new_rails_defaults.rb [Rick Olson] -* Add Rails.logger, Rails.root, Rails.env and Rails.cache shortcuts for RAILS_* constants [pratik] +* Add Rails.logger, Rails.root, Rails.env and Rails.cache shortcuts for RAILS_* constants [Pratik Naik] -* Allow files in plugins to be reloaded like the rest of the application. [rick] +* Allow files in plugins to be reloaded like the rest of the application. [Rick Olson] Enables or disables plugin reloading. @@ -162,7 +162,7 @@ Dependencies.load_once_paths << lib_path -* Small tweak to allow plugins to specify gem dependencies. [rick] +* Small tweak to allow plugins to specify gem dependencies. [Rick Olson] # OLD open_id_authentication plugin init.rb require 'yadis' @@ -177,7 +177,7 @@ ActionController::Base.send :include, OpenIdAuthentication end -* Added config.gem for specifying which gems are required by the application, as well as rake tasks for installing and freezing gems. [rick] +* Added config.gem for specifying which gems are required by the application, as well as rake tasks for installing and freezing gems. [Rick Olson] Rails::Initializer.run do |config| config.gem "bj" @@ -194,23 +194,23 @@ # Unpack specified gem to vendor/gems/gem_name-x.x.x rake gems:unpack GEM=bj -* Removed the default .htaccess configuration as there are so many good deployment options now (kept it as an example in README) [DHH] +* Removed the default .htaccess configuration as there are so many good deployment options now (kept it as an example in README) [David Heinemeier Hansson] * config.time_zone accepts TZInfo::Timezone identifiers as well as Rails TimeZone identifiers [Geoff Buesing] * Rails::Initializer#initialize_time_zone raises an error if value assigned to config.time_zone is not recognized. Rake time zone tasks only require ActiveSupport instead of entire environment [Geoff Buesing] -* Stop adding the antiquated test/mocks/* directories and only add them to the path if they're still there for legacy reasons [DHH] +* Stop adding the antiquated test/mocks/* directories and only add them to the path if they're still there for legacy reasons [David Heinemeier Hansson] -* Added that gems can now be plugins if they include rails/init.rb #11444 [jbarnette] +* Added that gems can now be plugins if they include rails/init.rb #11444 [John Barnette] -* Added Plugin#about method to programmatically access the about.yml in a plugin #10979 [lazyatom] +* Added Plugin#about method to programmatically access the about.yml in a plugin #10979 [James Adam] plugin = Rails::Plugin.new(path_to_my_plugin) plugin.about["author"] # => "James Adam" plugin.about["url"] # => "http://interblah.net" -* Improve documentation. [Radar, Jan De Poorter, chuyeow, xaviershay, danger, miloops, Xavier Noria, Sunny Ripert] +* Improve documentation. [Ryan Bigg, Jan De Poorter, Cheah Chu Yeow, Xavier Shay, Jack Danger Canty, Emilio Tagua, Xavier Noria, Sunny Ripert] * Added config.time_zone = 'UTC' in the default environment.rb [Geoff Buesing] @@ -218,7 +218,7 @@ * Add config.time_zone for configuring the default Time.zone value. #10982 [Geoff Buesing] -* Added support for installing plugins hosted at git repositories #11294 [danger] +* Added support for installing plugins hosted at git repositories #11294 [Jack Danger Canty] * Fixed that script/generate would not look for plugin generators in plugin_paths #11000 [glv] @@ -226,7 +226,7 @@ * Added a -e/--export to script/plugin install, uses svn export. #10847 [jon@blankpad.net)] -* Reshuffle load order so that routes and observers are initialized after plugins and app initializers. Closes #10980 [rick] +* Reshuffle load order so that routes and observers are initialized after plugins and app initializers. Closes #10980 [Rick Olson] * Git support for script/generate. #10690 [ssoroka] @@ -234,7 +234,7 @@ * Resurrect WordNet synonym lookups. #10710 [tom./, matt] -* Added config.cache_store to environment options to control the default cache store (default is FileStore if tmp/cache is present, otherwise MemoryStore is used) [DHH] +* Added config.cache_store to environment options to control the default cache store (default is FileStore if tmp/cache is present, otherwise MemoryStore is used) [David Heinemeier Hansson] * Added that rails:update is run when you do rails:freeze:edge to ensure you also get the latest JS and config files #10565 [jeff] @@ -247,9 +247,9 @@ *2.0.2* (December 16th, 2007) -* Changed the default database from mysql to sqlite3, so now running "rails myapp" will have a config/database.yml that's setup for SQLite3 (which in OS X Leopard is installed by default, so is the gem, so everything Just Works with no database configuration at all). To get a Rails application preconfigured for MySQL, just run "rails -d mysql myapp" [DHH] +* Changed the default database from mysql to sqlite3, so now running "rails myapp" will have a config/database.yml that's setup for SQLite3 (which in OS X Leopard is installed by default, so is the gem, so everything Just Works with no database configuration at all). To get a Rails application preconfigured for MySQL, just run "rails -d mysql myapp" [David Heinemeier Hansson] -* Turned on ActionView::Base.cache_template_loading by default in config/environments/production.rb to prevent file system stat calls for every template loading to see if it changed (this means that you have to restart the application to see template changes in production mode) [DHH] +* Turned on ActionView::Base.cache_template_loading by default in config/environments/production.rb to prevent file system stat calls for every template loading to see if it changed (this means that you have to restart the application to see template changes in production mode) [David Heinemeier Hansson] * Introduce `rake secret` to output a crytographically secure secret key for use with cookie sessions #10363 [revans] @@ -273,19 +273,19 @@ * The test task stops with a warning if you have pending migrations. #10377 [Josh Knowles] -* Add warning to documentation about using transactional fixtures when the code under test uses transactions itself. Closes #7548 [thijsv] +* Add warning to documentation about using transactional fixtures when the code under test uses transactions itself. Closes #7548 [Thijs van der Vossen] * Update Prototype to 1.6.0.1. [sam] * Update script.aculo.us to 1.8.0.1. [madrobby] -* Added db:fixtures:identity as a way of locating what ID a foxy fixture was assigned #10332 [jbarnette] +* Added db:fixtures:identity as a way of locating what ID a foxy fixture was assigned #10332 [John Barnette] -* Generated fixtures should not specify ids since theyre expected to be foxy fixtures #10330 [jbarnette] +* Generated fixtures should not specify ids since theyre expected to be foxy fixtures #10330 [John Barnette] * Update to Prototype -r8232. [sam] -* Introduce SecretKeyGenerator for more secure session secrets than CGI::Session's pseudo-random id generator. Consider extracting to Active Support later. #10286 [Hongli Lai] +* Introduce SecretKeyGenerator for more secure session secrets than CGI::Session's pseudo-random id generator. Consider extracting to Active Support later. #10286 [Hongli Lai (Phusion)] * RAILS_GEM_VERSION may be set to any valid gem version specifier. #10057 [Chad Woolley, Cheah Chu Yeow] @@ -295,11 +295,11 @@ * Only load ActionMailer::TestCase if ActionMailer is loaded. Closes #10137 [defunkt] -* Fixed that db:reset would use migrations instead of loading db/schema.rb [DHH] +* Fixed that db:reset would use migrations instead of loading db/schema.rb [David Heinemeier Hansson] * Ensure the plugin loader only loads plugins once. Closes #10102 [haruki_zaemon] -* Refactor Plugin Loader. Add plugin lib paths early, and add lots of tests. Closes #9795 [lazyatom] +* Refactor Plugin Loader. Add plugin lib paths early, and add lots of tests. Closes #9795 [James Adam] * Added --skip-timestamps to generators that produce models #10036 [Tim Pope] @@ -313,7 +313,7 @@ * config/boot.rb correctly detects RAILS_GEM_VERSION. #9834 [alexch, thewoolleyman] -* Fixed incorrect migration number if script/generate executed outside of Rails root #7080 [jeremymcanally] +* Fixed incorrect migration number if script/generate executed outside of Rails root #7080 [Jeremy McAnally] * Update Prototype to 1.6.0_rc1 and script.aculo.us to 1.8.0 preview 0. [sam, madrobby] @@ -326,7 +326,7 @@ * db:create works with remote databases whereas db:create:all only creates databases on localhost. #9753 [Trevor Wennblom] -* Removed calls to fixtures in generated tests as fixtures :all is now present by default in test_helper.rb [DHH] +* Removed calls to fixtures in generated tests as fixtures :all is now present by default in test_helper.rb [David Heinemeier Hansson] * Add --prefix option to script/server when using mongrel. [dacat] @@ -335,13 +335,13 @@ databases on localhost. #9753 [Trevor Wennblom] * Fixed that installing plugins from SVN repositories that use trunk/ will work #8188 [evan] -* Moved the SourceAnnotationExtractor to a separate file in case libraries try to load the rails rake tasks twice. [Rick] +* Moved the SourceAnnotationExtractor to a separate file in case libraries try to load the rails rake tasks twice. [Rick Olson] * Moved Dispatcher to ActionController::Dispatcher. [Jeremy Kemper] -* Changed the default logger from Ruby's own Logger with the clean_logger extensions to ActiveSupport::BufferedLogger for performance reasons [DHH]. (You can change it back with config.logger = Logger.new("/path/to/log", level).) +* Changed the default logger from Ruby's own Logger with the clean_logger extensions to ActiveSupport::BufferedLogger for performance reasons [David Heinemeier Hansson]. (You can change it back with config.logger = Logger.new("/path/to/log", level).) -* Added a default 422.html page to be rendered when ActiveRecord::RecordInvalid, ActiveRecord::RecordNotSaved, or ActionController::InvalidAuthenticityToken is raised [DHH] +* Added a default 422.html page to be rendered when ActiveRecord::RecordInvalid, ActiveRecord::RecordNotSaved, or ActionController::InvalidAuthenticityToken is raised [David Heinemeier Hansson] * Added --skip-fixture option to script/generate model #6862 [sandofsky] @@ -349,15 +349,15 @@ databases on localhost. #9753 [Trevor Wennblom] * Fixed the placement of fixture files for nested models when generating through script/generate model #7547 [jkit] -* Added TEMPLATE option to rake doc:app to set a custom output template #7737 [Jakob S] +* Added TEMPLATE option to rake doc:app to set a custom output template #7737 [Jakob Skjerning] -* Added VERBOSE option to rake db:migrate to turn off output #8204 [jbarnette] +* Added VERBOSE option to rake db:migrate to turn off output #8204 [John Barnette] * Fixed that rake doc:app should use UTF-8 #8906 [farzy] * Fixes rake annotations to search erb and builder files as well #9150 [m.langenberg] -* Removed web_service generator [Koz] +* Removed web_service generator [Michael Koziarski] * Added the :all option to config.plugins that'll include the rest of the plugins not already explicitly named #9613 [Frederick Cheung]. Example: @@ -366,11 +366,11 @@ databases on localhost. #9753 [Trevor Wennblom] * Added symbols as a legal way of specifying plugins in config.plugins #9629 [tom] -* Removed deprecated task names, like clear_logs, in favor of the new namespaced style [DHH] +* Removed deprecated task names, like clear_logs, in favor of the new namespaced style [David Heinemeier Hansson] -* Support multiple config.after_initialize blocks so plugins and apps can more easily cooperate. #9582 [zdennis] +* Support multiple config.after_initialize blocks so plugins and apps can more easily cooperate. #9582 [Zach Dennis] -* Added db:drop:all to drop all databases declared in config/database.yml [DHH] +* Added db:drop:all to drop all databases declared in config/database.yml [David Heinemeier Hansson] * Use attribute pairs instead of the migration name to create add and remove column migrations. Closes #9166 [Pratik Naik] @@ -382,11 +382,11 @@ databases on localhost. #9753 [Trevor Wennblom] ruby script/generation migration RemoveSomeStuffFromCustomers first_name:string last_name:string -* Add ActiveResource to Rails::Info. Closes #8741 [kampers] +* Add ActiveResource to Rails::Info. Closes #8741 [Chris Kampmeier] * use Gem.find_name instead of search when freezing gems. Prevent false positives for other gems with rails in the name. Closes #8729 [wselman] -* Automatically generate add/remove column commands in specially named migrations like AddLocationToEvent. Closes #9006 [zenspider] +* Automatically generate add/remove column commands in specially named migrations like AddLocationToEvent. Closes #9006 [Ryan Davis] * Default to plural table name in Rails Generator if ActiveRecord is not present. Closes #8963 [evan] @@ -404,7 +404,7 @@ databases on localhost. #9753 [Trevor Wennblom] * Fix that FCGIs would leave log files open when asked to shut down by USR2. #3028 [Sebastian Kanthak, Josh Peek] -* Fixed that dispatcher preparation callbacks only run once in production mode. Mock Routes.reload so that dispatcher preparation callback tests run. [Rick] +* Fixed that dispatcher preparation callbacks only run once in production mode. Mock Routes.reload so that dispatcher preparation callback tests run. [Rick Olson] * Fix syntax error in dispatcher than wrecked failsafe responses. #8625 [mtitorenko] @@ -432,11 +432,11 @@ databases on localhost. #9753 [Trevor Wennblom] * Generators use *.html.erb view template naming. #8278 [Tim Pope] -* Updated resource_scaffold and model generators to use short-hand style migrations [DHH] +* Updated resource_scaffold and model generators to use short-hand style migrations [David Heinemeier Hansson] * Updated initializer to only load #{RAILS_ENV}.rb once. Added deprecation warning for config.breakpoint_server. [Nicholas Seckar] -* Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [DHH] +* Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [David Heinemeier Hansson] To use the new debugger, start your server with script/server --debugger and insert a call to 'debugger' (instead of 'breakpoint') where you want to jump into the debugger. @@ -454,13 +454,13 @@ databases on localhost. #9753 [Trevor Wennblom] * Include Active Resource in rails:freeze:edge rake task. [Thomas Fuchs] -* Include Active Resource instead of Action Web Service [DHH] You can add AWS back with this in config/environment.rb: +* Include Active Resource instead of Action Web Service [David Heinemeier Hansson] You can add AWS back with this in config/environment.rb: config.load_paths += %W( #{RAILS_ROOT}/vendor/rails/actionwebservice/lib ) ...or just gem 'actionwebservice' -* Give generate scaffold a more descriptive database message. Closes #7316 [jeremymcanally] +* Give generate scaffold a more descriptive database message. Closes #7316 [Jeremy McAnally] * Canonicalize RAILS_ROOT by using File.expand_path on Windows, which doesn't have to worry about symlinks, and Pathname#realpath elsewhere, which respects symlinks in relative paths but is incompatible with Windows. #6755 [Jeremy Kemper, trevor] @@ -474,19 +474,19 @@ databases on localhost. #9753 [Trevor Wennblom] * Split plugin location and loading out of the initializer and into a new Plugin namespace, which includes Plugin::Locater and Plugin::Loader. The loader class that is used can be customized using the config.plugin_loader option. Those monkey patching the plugin loading subsystem take note, the internals changing here will likely break your modifications. The good news is that it should be substantially easier to hook into the plugin locating and loading process now. [Marcel Molina Jr.] -* Added assumption that all plugin creators desire to be sharing individuals and release their work under the MIT license [DHH] +* Added assumption that all plugin creators desire to be sharing individuals and release their work under the MIT license [David Heinemeier Hansson] * Added source-annotations extractor tasks to rake [Jamis Buck]. This allows you to add FIXME, OPTIMIZE, and TODO comments to your source code that can then be extracted in concert with rake notes (shows all), rake notes:fixme, rake notes:optimize and rake notes:todo. -* Added fixtures :all to test_helper.rb to assume that most people just want all their fixtures loaded all the time [DHH] +* Added fixtures :all to test_helper.rb to assume that most people just want all their fixtures loaded all the time [David Heinemeier Hansson] -* Added config/initializers where all ruby files within it are automatically loaded after the Rails configuration is done, so you don't have to litter the environment.rb file with a ton of mixed stuff [DHH] +* Added config/initializers where all ruby files within it are automatically loaded after the Rails configuration is done, so you don't have to litter the environment.rb file with a ton of mixed stuff [David Heinemeier Hansson] * For new apps, generate a random secret for the cookie-based session store. [Jeremy Kemper] -* Stop swallowing errors during rake test [Koz] +* Stop swallowing errors during rake test [Michael Koziarski] -* Update Rails Initializer to use ActionController::Base#view_paths [Rick] +* Update Rails Initializer to use ActionController::Base#view_paths [Rick Olson] * Fix gem deprecation warnings, which also means depending on RubyGems 0.9.0+ [Chad Fowler] @@ -504,12 +504,12 @@ databases on localhost. #9753 [Trevor Wennblom] * Fixed that webrick would strip leading newlines and hang connection #4156 [psross] -* Ensure plugins are in the Dependencies.load_once_paths collection by default. [Rick] +* Ensure plugins are in the Dependencies.load_once_paths collection by default. [Rick Olson] If you really want your plugins to reload, add this to the very top of init.rb: Dependencies.load_once_paths.delete(lib_path) -* Allow config.to_prepare to work, make the dispatcher safe to 're require'. [Koz, Nicholas Seckar] +* Allow config.to_prepare to work, make the dispatcher safe to 're require'. [Michael Koziarski, Nicholas Seckar] * Fix scaffold_resource generator so it respects the --pretend argument when creating the routes file. Closes #6852 [fearoffish] @@ -519,25 +519,25 @@ databases on localhost. #9753 [Trevor Wennblom] * Don't generate a components directory in new Rails apps. [Jeremy Kemper] -* Fixed script/process/spawner to work properly with Mongrel including in -r (daemonize mode) [DHH] +* Fixed script/process/spawner to work properly with Mongrel including in -r (daemonize mode) [David Heinemeier Hansson] -* Added one-letter aliases for the three default environments to script/console, so script/console p will load the production environment (t for test, d for development) [DHH] +* Added one-letter aliases for the three default environments to script/console, so script/console p will load the production environment (t for test, d for development) [David Heinemeier Hansson] -* Fixed that script/server running against Mongrel should tail the proper log regardless of the environment [DHH] +* Fixed that script/server running against Mongrel should tail the proper log regardless of the environment [David Heinemeier Hansson] * Update initializer to load Rails::VERSION as soon as possible. Closes #6698. [Nicholas Seckar] -* Added ActiveRecord::Base.clear_active_connections! in development mode so the database connection is not carried over from request to request. Some databases won't reread the schema if that doesn't happen (I'm looking at you SQLite), so you have to restart the server after each migration (= no fun) [DHH] +* Added ActiveRecord::Base.clear_active_connections! in development mode so the database connection is not carried over from request to request. Some databases won't reread the schema if that doesn't happen (I'm looking at you SQLite), so you have to restart the server after each migration (= no fun) [David Heinemeier Hansson] -* Made RAILS_GEM_VERSION work for beta gems too, so specifying 1.1.6 will give you 1.1.6.4520 if available [DHH] +* Made RAILS_GEM_VERSION work for beta gems too, so specifying 1.1.6 will give you 1.1.6.4520 if available [David Heinemeier Hansson] * Update to Prototype and script.aculo.us [5579]. [Thomas Fuchs] -* Made script/server work with -e and -d when using Mongrel [DHH] +* Made script/server work with -e and -d when using Mongrel [David Heinemeier Hansson] * Update to Prototype 1.5.0_rc2 [5550] which makes it work in Opera again [Thomas Fuchs] -* Make sure that exceptions which are thrown outside of the user code try their best to be handeled in ApplicationController#rescue_action [Tobias Luetke] +* Make sure that exceptions which are thrown outside of the user code try their best to be handeled in ApplicationController#rescue_action [Tobias Lütke] * Rails::VERSION::STRING should always be available without having to require 'rails/version'. #6244 [fearoffish] @@ -561,31 +561,31 @@ databases on localhost. #9753 [Trevor Wennblom] * resource and scaffold_resource generators add a restful route to config/routes.rb [Jeremy Kemper] -* Revert environment changes for autoload_paths. [Koz] +* Revert environment changes for autoload_paths. [Michael Koziarski] * Update to latest Prototype, which doesn't serialize disabled form elements, adds clone() to arrays, empty/non-string Element.update() and adds a fixes excessive error reporting in WebKit beta versions [Thomas Fuchs] -* Clean up the output of rake stats, de-emphasise components and apis, and remove the indents for tests [Koz] +* Clean up the output of rake stats, de-emphasise components and apis, and remove the indents for tests [Michael Koziarski] -* Added option to script/process/spawner of specifying the binding address #5133 [zsombor] +* Added option to script/process/spawner of specifying the binding address #5133 [Dee Zsombor] * Update environment.rb comments to include config.autoload_paths. Closes #6478 [caio] -* Update scaffold to use new form_tag block functionality. Closes #6480. [BobSilva] +* Update scaffold to use new form_tag block functionality. Closes #6480. [Bob Silva] * Plugin generator: check for class collisions. #4833 [vinbarnes@gmail.com] * Mailer generator: handle mailers in modules, set mime_version in unit test. [Jeremy Kemper] -* Set $KCODE to 'u' by default to enable the multibyte safe String#chars proxy. [Koz] +* Set $KCODE to 'u' by default to enable the multibyte safe String#chars proxy. [Michael Koziarski] -* Added config.plugins to control which plugins are loaded #6269 [skaes]. By default, everything in vendor/plugins will be loaded, but if you specify config.plugins, only those will be loaded. Example: +* Added config.plugins to control which plugins are loaded #6269 [Stefan Kaes]. By default, everything in vendor/plugins will be loaded, but if you specify config.plugins, only those will be loaded. Example: config.plugins = %w[ routing_navigator simply_helpful ] * Clean up html on included error pages. [Tim Lucas] -* Fixed default 404.html and 500.htmls to remove extreme ugliness and include human language [DHH] +* Fixed default 404.html and 500.htmls to remove extreme ugliness and include human language [David Heinemeier Hansson] * Update to latest Prototype and script.aculo.us trunk versions [Thomas Fuchs] @@ -593,17 +593,17 @@ databases on localhost. #9753 [Trevor Wennblom] * Fixed test:uncommitted on Windows (backslash issue) #4999 [paul@paulbutcher.com] -* Fixed migration creation to work with namespaced models, so script/generate model Gallery::Image will use create_table :gallery_images #6327 [BobSilva] +* Fixed migration creation to work with namespaced models, so script/generate model Gallery::Image will use create_table :gallery_images #6327 [Bob Silva] * Fixed rename_table on SQLite tables with indexes defined #5942 [brandon@opensoul.org] -* Added default timeout setting of 5 seconds to SQLite3 database.yml configurations [DHH] +* Added default timeout setting of 5 seconds to SQLite3 database.yml configurations [David Heinemeier Hansson] -* Added generated attribute options to script/generate model, like the one found in scaffold_resource and resource [DHH]. Examples: +* Added generated attribute options to script/generate model, like the one found in scaffold_resource and resource [David Heinemeier Hansson]. Examples: ./script/generate model post title:string created_on:date body:text published:boolean -* Added script/generate resource which works just like scaffold_resource, but creates empty placeholders instead of predefined [DHH] +* Added script/generate resource which works just like scaffold_resource, but creates empty placeholders instead of predefined [David Heinemeier Hansson] * script/runner can run files, pass on arguments, and be used as a shebang. #6286 [Tuxie, dlpond] #!/usr/bin/env /path/to/my/app/script/runner @@ -612,7 +612,7 @@ databases on localhost. #9753 [Trevor Wennblom] * Look for rake tasks in plugin subdirs. #6259 [obrie] -* Added map.connect ':controller/:action/:id.:format' as a default route to config/routes.rb [DHH] +* Added map.connect ':controller/:action/:id.:format' as a default route to config/routes.rb [David Heinemeier Hansson] * Updated prototype.js to 1.5.0_rc1 with latest fixes. [Rick Olson] @@ -624,7 +624,7 @@ databases on localhost. #9753 [Trevor Wennblom] * script/server creates the tmp/pids directory. #6204 [jonathan] -* Fix script/console --sandbox for internal transactions changes. #5738 [chris@octopod.info, charles.gerungan@gmail.com] +* Fix script/console --sandbox for internal transactions changes. #5738 [Chris McGrath, charles.gerungan@gmail.com] * Remove the uncanny default of adding all app/models/*/ directories to the load path. This change will break application which expect the current behavior. As documented in initializer.rb, the workaround is: @@ -637,7 +637,7 @@ References #6031. [Nicholas Seckar] * Update to Prototype 1.5.0_rc1 [sam] -* Formally Deprecate the old rake tasks. [Koz] +* Formally Deprecate the old rake tasks. [Michael Koziarski] * Thoroughly test the FCGI dispatcher. #5970 [Kevin Clark] @@ -670,7 +670,7 @@ References #6031. [Nicholas Seckar] * Fix Dispatcher.reset_application! so that AR subclasses are removed and Observers re-initialized *after* Reloadable classes are removed. Closes #5743. [Rick Olson] -* Clarify usage of script/plugin source. Closes #5344. [james.adam@gmail.com] +* Clarify usage of script/plugin source. Closes #5344. [James Adam] * Add Dispatcher.to_prepare and config.to_prepare to provide a pre-request hook. [Nicholas Seckar] @@ -678,7 +678,7 @@ References #6031. [Nicholas Seckar] * Added that you can change the web server port in config/lighttpd.conf from script/server --port/-p #5465 [mats@imediatec.co.uk] -* script/performance/profiler compatibility with the new ruby-prof, including an option to choose the results printer. #5679 [shugo@ruby-lang.org] +* script/performance/profiler compatibility with the new ruby-prof, including an option to choose the results printer. #5679 [Shugo Maeda] * Fixed the failsafe response so it uses either the current recognized controller or ApplicationController. [Rick Olson] @@ -692,7 +692,7 @@ References #6031. [Nicholas Seckar] * Ensure the logger is initialized. #5629 [mike@clarkware.com] -* Added Mongrel-spawning capabilities to script/process/spawner. Mongrel will be the default choice if installed, otherwise FCGI is tried [DHH]. Examples: +* Added Mongrel-spawning capabilities to script/process/spawner. Mongrel will be the default choice if installed, otherwise FCGI is tried [David Heinemeier Hansson]. Examples: spawner # starts instances on 8000, 8001, and 8002 using Mongrel if available spawner fcgi # starts instances on 8000, 8001, and 8002 using FCGI @@ -735,15 +735,15 @@ References #6031. [Nicholas Seckar] * Mongrel: script/server works on Win32. #5499 [jeremydurham@gmail.com] -* Remove opts.on { |options[:option_name] } style hash assignment. Closes #4440. [nicksieger@gmail.com] +* Remove opts.on { |options[:option_name] } style hash assignment. Closes #4440. [Nick Sieger] * Mongrel support for script/server. #5475 [jeremydurham@gmail.com] -* Fix script/plugin so it doesn't barf on invalid URLs [Rick] +* Fix script/plugin so it doesn't barf on invalid URLs [Rick Olson] * Fix plugin install bug at dir with space. (closes #5359) [Yoshimasa NIWA] -* Fix bug with 'script/plugin install' so it reports unknown plugin names correctly. [Rick] +* Fix bug with 'script/plugin install' so it reports unknown plugin names correctly. [Rick Olson] * Added uninstall.rb hook to plugin handling, such that plugins have a way of removing assets and other artifacts on removal #5003 [takiuchi@drecom.co.jp] @@ -753,11 +753,11 @@ References #6031. [Nicholas Seckar] * Make "script/plugin install" work with svn+ssh URLs. [Sam Stephenson] -* Added lib/ to the directories that will get application docs generated [DHH] +* Added lib/ to the directories that will get application docs generated [David Heinemeier Hansson] -* Add observer generator. Closes #5167. [francois.beausoleil@gmail.com] +* Add observer generator. Closes #5167. [François Beausoleil] -* Session migration generator obeys pluralize_table_names. #5145 [james.adam@gmail.com] +* Session migration generator obeys pluralize_table_names. #5145 [James Adam] * rake test:recent understands subdirectories. #2925 [jerrett@bravenet.com] @@ -765,17 +765,17 @@ References #6031. [Nicholas Seckar] * The app generator sets a session key in application.rb so apps running on the same host may distinguish their cookies. #2967 [rcoder, rails-bug@owl.me.uk] -* Distinguish the spawners for different processes [DHH] +* Distinguish the spawners for different processes [David Heinemeier Hansson] -* Added -n/--process to script/process/spawner name the process pid (default is dispatch) [DHH] +* Added -n/--process to script/process/spawner name the process pid (default is dispatch) [David Heinemeier Hansson] * Namespaced OrderedHash so the Rails implementation does not clash with any others. (fixes #4911) [Julian Tarkhanov] * Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.] -* Added script/process/inspector to do simple process status information on Rails dispatchers keeping pid files in tmp/pids [DHH] +* Added script/process/inspector to do simple process status information on Rails dispatchers keeping pid files in tmp/pids [David Heinemeier Hansson] -* Added pid file usage to script/process/spawner and script/process/reaper along with a directive in default config/lighttpd.conf file to record the pid. They will all save their pid file in tmp/pids [DHH] +* Added pid file usage to script/process/spawner and script/process/reaper along with a directive in default config/lighttpd.conf file to record the pid. They will all save their pid file in tmp/pids [David Heinemeier Hansson] *1.2.3* (March 12th, 2007) @@ -784,14 +784,14 @@ References #6031. [Nicholas Seckar] * Windows: include MinGW in RUBY_PLATFORM check. #2982 [okkez000@gmail.com, Kaspar Schiess] -* Stop swallowing errors during rake test [Koz] +* Stop swallowing errors during rake test [Michael Koziarski] *1.2.2* (February 5th, 2007) * Fix gem deprecation warnings, which also means depending on RubyGems 0.9.0+ [Chad Fowler] -* Require the dispatcher for Rails::Configuration#to_prepare. [Rick] +* Require the dispatcher for Rails::Configuration#to_prepare. [Rick Olson] *1.2.1* (January 16th, 2007) @@ -807,7 +807,7 @@ References #6031. [Nicholas Seckar] * Fixed that webrick would strip leading newlines and hang connection #4156 [psross] -* Ensure plugins are in the Dependencies.load_once_paths collection by default. [Rick] +* Ensure plugins are in the Dependencies.load_once_paths collection by default. [Rick Olson] If you really want your plugins to reload, add this to the very top of init.rb: Dependencies.load_once_paths.delete(lib_path) @@ -820,23 +820,23 @@ References #6031. [Nicholas Seckar] * Don't generate a components directory in new Rails apps. [Jeremy Kemper] -* Fixed script/process/spawner to work properly with Mongrel including in -r (daemonize mode) [DHH] +* Fixed script/process/spawner to work properly with Mongrel including in -r (daemonize mode) [David Heinemeier Hansson] -* Deprecated the name route "root" as it'll be used as a shortcut for map.connect '' in Rails 2.0 [DHH] +* Deprecated the name route "root" as it'll be used as a shortcut for map.connect '' in Rails 2.0 [David Heinemeier Hansson] -* Fixed that script/server running against Mongrel should tail the proper log regardless of the environment [DHH] +* Fixed that script/server running against Mongrel should tail the proper log regardless of the environment [David Heinemeier Hansson] * Update initializer to load Rails::VERSION as soon as possible. Closes #6698. [Nicholas Seckar] -* Added ActiveRecord::Base.clear_active_connections! in development mode so the database connection is not carried over from request to request. Some databases won't reread the schema if that doesn't happen (I'm looking at you SQLite), so you have to restart the server after each migration (= no fun) [DHH] +* Added ActiveRecord::Base.clear_active_connections! in development mode so the database connection is not carried over from request to request. Some databases won't reread the schema if that doesn't happen (I'm looking at you SQLite), so you have to restart the server after each migration (= no fun) [David Heinemeier Hansson] -* Made RAILS_GEM_VERSION work for beta gems too, so specifying 1.1.6 will give you 1.1.6.4520 if available [DHH] +* Made RAILS_GEM_VERSION work for beta gems too, so specifying 1.1.6 will give you 1.1.6.4520 if available [David Heinemeier Hansson] * Update to Prototype and script.aculo.us [5579]. [Sam Stephenson, Thomas Fuchs] -* Made script/server work with -e and -d when using Mongrel [DHH] +* Made script/server work with -e and -d when using Mongrel [David Heinemeier Hansson] -* Make sure that exceptions which are thrown outside of the user code try their best to be handeled in ApplicationController#rescue_action [Tobias Luetke] +* Make sure that exceptions which are thrown outside of the user code try their best to be handeled in ApplicationController#rescue_action [Tobias Lütke] * Rails::VERSION::STRING should always be available without having to require 'rails/version'. #6244 [fearoffish] @@ -856,29 +856,29 @@ References #6031. [Nicholas Seckar] * resource and scaffold_resource generators add a restful route to config/routes.rb [Jeremy Kemper] -* Revert environment changes for autoload_paths. [Koz] +* Revert environment changes for autoload_paths. [Michael Koziarski] -* Clean up the output of rake stats, de-emphasise components and apis, and remove the indents for tests [Koz] +* Clean up the output of rake stats, de-emphasise components and apis, and remove the indents for tests [Michael Koziarski] -* Added option to script/process/spawner of specifying the binding address #5133 [zsombor] +* Added option to script/process/spawner of specifying the binding address #5133 [Dee Zsombor] * Update environment.rb comments to include config.autoload_paths. Closes #6478 [caio] -* Update scaffold to use new form_tag block functionality. Closes #6480. [BobSilva] +* Update scaffold to use new form_tag block functionality. Closes #6480. [Bob Silva] * Plugin generator: check for class collisions. #4833 [vinbarnes@gmail.com] * Mailer generator: handle mailers in modules, set mime_version in unit test. [Jeremy Kemper] -* Set $KCODE to 'u' by default to enable the multibyte safe String#chars proxy. [Koz] +* Set $KCODE to 'u' by default to enable the multibyte safe String#chars proxy. [Michael Koziarski] -* Added config.plugins to control which plugins are loaded #6269 [skaes]. By default, everything in vendor/plugins will be loaded, but if you specify config.plugins, only those will be loaded. Example: +* Added config.plugins to control which plugins are loaded #6269 [Stefan Kaes]. By default, everything in vendor/plugins will be loaded, but if you specify config.plugins, only those will be loaded. Example: config.plugins = %w[ routing_navigator simply_helpful ] * Clean up html on included error pages. [Tim Lucas] -* Fixed default 404.html and 500.htmls to remove extreme ugliness and include human language [DHH] +* Fixed default 404.html and 500.htmls to remove extreme ugliness and include human language [David Heinemeier Hansson] * Update to latest Prototype and script.aculo.us trunk versions [Thomas Fuchs] @@ -886,17 +886,17 @@ References #6031. [Nicholas Seckar] * Fixed test:uncommitted on Windows (backslash issue) #4999 [paul@paulbutcher.com] -* Fixed migration creation to work with namespaced models, so script/generate model Gallery::Image will use create_table :gallery_images #6327 [BobSilva] +* Fixed migration creation to work with namespaced models, so script/generate model Gallery::Image will use create_table :gallery_images #6327 [Bob Silva] * Fixed rename_table on SQLite tables with indexes defined #5942 [brandon@opensoul.org] -* Added default timeout setting of 5 seconds to SQLite3 database.yml configurations [DHH] +* Added default timeout setting of 5 seconds to SQLite3 database.yml configurations [David Heinemeier Hansson] -* Added generated attribute options to script/generate model, like the one found in scaffold_resource and resource [DHH]. Examples: +* Added generated attribute options to script/generate model, like the one found in scaffold_resource and resource [David Heinemeier Hansson]. Examples: ./script/generate model post title:string created_on:date body:text published:boolean -* Added script/generate resource which works just like scaffold_resource, but creates empty placeholders instead of predefined [DHH] +* Added script/generate resource which works just like scaffold_resource, but creates empty placeholders instead of predefined [David Heinemeier Hansson] * script/runner can run files, pass on arguments, and be used as a shebang. #6286 [Tuxie, dlpond] #!/usr/bin/env /path/to/my/app/script/runner @@ -905,13 +905,13 @@ References #6031. [Nicholas Seckar] * Look for rake tasks in plugin subdirs. #6259 [obrie] -* Added map.connect ':controller/:action/:id.:format' as a default route to config/routes.rb [DHH] +* Added map.connect ':controller/:action/:id.:format' as a default route to config/routes.rb [David Heinemeier Hansson] * session_migration generator adds an index on updated_at. #6207 [grg] * script/server creates the tmp/pids directory. #6204 [jonathan] -* Fix script/console --sandbox for internal transactions changes. #5738 [chris@octopod.info, charles.gerungan@gmail.com] +* Fix script/console --sandbox for internal transactions changes. #5738 [Chris McGrath, charles.gerungan@gmail.com] * Remove the uncanny default of adding all app/models/*/ directories to the load path. This change will break application which expect the current behavior. As documented in initializer.rb, the workaround is: @@ -922,7 +922,7 @@ References #6031. [Nicholas Seckar] * Update to script.aculo.us 1.6.3 [Thomas Fuchs] -* Formally Deprecate the old rake tasks. [Koz] +* Formally Deprecate the old rake tasks. [Michael Koziarski] * Thoroughly test the FCGI dispatcher. #5970 [Kevin Clark] @@ -953,7 +953,7 @@ References #6031. [Nicholas Seckar] * Fix Dispatcher.reset_application! so that AR subclasses are removed and Observers re-initialized *after* Reloadable classes are removed. Closes #5743. [Rick Olson] -* Clarify usage of script/plugin source. Closes #5344. [james.adam@gmail.com] +* Clarify usage of script/plugin source. Closes #5344. [James Adam] * Add Dispatcher.to_prepare and config.to_prepare to provide a pre-request hook. [Nicholas Seckar] @@ -961,7 +961,7 @@ References #6031. [Nicholas Seckar] * Added that you can change the web server port in config/lighttpd.conf from script/server --port/-p #5465 [mats@imediatec.co.uk] -* script/performance/profiler compatibility with the new ruby-prof, including an option to choose the results printer. #5679 [shugo@ruby-lang.org] +* script/performance/profiler compatibility with the new ruby-prof, including an option to choose the results printer. #5679 [Shugo Maeda] * Fixed the failsafe response so it uses either the current recognized controller or ApplicationController. [Rick Olson] @@ -975,7 +975,7 @@ References #6031. [Nicholas Seckar] * Ensure the logger is initialized. #5629 [mike@clarkware.com] -* Added Mongrel-spawning capabilities to script/process/spawner. Mongrel will be the default choice if installed, otherwise FCGI is tried [DHH]. Examples: +* Added Mongrel-spawning capabilities to script/process/spawner. Mongrel will be the default choice if installed, otherwise FCGI is tried [David Heinemeier Hansson]. Examples: spawner # starts instances on 8000, 8001, and 8002 using Mongrel if available spawner fcgi # starts instances on 8000, 8001, and 8002 using FCGI @@ -1018,15 +1018,15 @@ References #6031. [Nicholas Seckar] * Mongrel: script/server works on Win32. #5499 [jeremydurham@gmail.com] -* Remove opts.on { |options[:option_name] } style hash assignment. Closes #4440. [nicksieger@gmail.com] +* Remove opts.on { |options[:option_name] } style hash assignment. Closes #4440. [Nick Sieger] * Mongrel support for script/server. #5475 [jeremydurham@gmail.com] -* Fix script/plugin so it doesn't barf on invalid URLs [Rick] +* Fix script/plugin so it doesn't barf on invalid URLs [Rick Olson] * Fix plugin install bug at dir with space. (closes #5359) [Yoshimasa NIWA] -* Fix bug with 'script/plugin install' so it reports unknown plugin names correctly. [Rick] +* Fix bug with 'script/plugin install' so it reports unknown plugin names correctly. [Rick Olson] * Added uninstall.rb hook to plugin handling, such that plugins have a way of removing assets and other artifacts on removal #5003 [takiuchi@drecom.co.jp] @@ -1036,11 +1036,11 @@ References #6031. [Nicholas Seckar] * Make "script/plugin install" work with svn+ssh URLs. [Sam Stephenson] -* Added lib/ to the directories that will get application docs generated [DHH] +* Added lib/ to the directories that will get application docs generated [David Heinemeier Hansson] -* Add observer generator. Closes #5167. [francois.beausoleil@gmail.com] +* Add observer generator. Closes #5167. [François Beausoleil] -* Session migration generator obeys pluralize_table_names. #5145 [james.adam@gmail.com] +* Session migration generator obeys pluralize_table_names. #5145 [James Adam] * rake test:recent understands subdirectories. #2925 [jerrett@bravenet.com] @@ -1048,17 +1048,17 @@ References #6031. [Nicholas Seckar] * The app generator sets a session key in application.rb so apps running on the same host may distinguish their cookies. #2967 [rcoder, rails-bug@owl.me.uk] -* Distinguish the spawners for different processes [DHH] +* Distinguish the spawners for different processes [David Heinemeier Hansson] -* Added -n/--process to script/process/spawner name the process pid (default is dispatch) [DHH] +* Added -n/--process to script/process/spawner name the process pid (default is dispatch) [David Heinemeier Hansson] * Namespaced OrderedHash so the Rails implementation does not clash with any others. (fixes #4911) [Julian Tarkhanov] * Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.] -* Added script/process/inspector to do simple process status information on Rails dispatchers keeping pid files in tmp/pids [DHH] +* Added script/process/inspector to do simple process status information on Rails dispatchers keeping pid files in tmp/pids [David Heinemeier Hansson] -* Added pid file usage to script/process/spawner and script/process/reaper along with a directive in default config/lighttpd.conf file to record the pid. They will all save their pid file in tmp/pids [DHH] +* Added pid file usage to script/process/spawner and script/process/reaper along with a directive in default config/lighttpd.conf file to record the pid. They will all save their pid file in tmp/pids [David Heinemeier Hansson] *1.1.6* (August 10th, 2006) @@ -1093,9 +1093,9 @@ References #6031. [Nicholas Seckar] * Change the scaffolding layout to use yield rather than @content_for_layout. [Marcel Molina Jr.] -* Added rake rails:update:configs to update config/boot.rb from the latest (also included in rake rails:update) [DHH] +* Added rake rails:update:configs to update config/boot.rb from the latest (also included in rake rails:update) [David Heinemeier Hansson] -* Fixed that boot.rb would set RAILS_GEM_VERSION twice, not respect an uncommented RAILS_GEM_VERSION line, and not use require_gem [DHH] +* Fixed that boot.rb would set RAILS_GEM_VERSION twice, not respect an uncommented RAILS_GEM_VERSION line, and not use require_gem [David Heinemeier Hansson] *1.1.1* (April 6th, 2006) @@ -1106,7 +1106,7 @@ References #6031. [Nicholas Seckar] * Fixed that the -r/--ruby path option of the rails command was not being respected #4549 [ryan.raaum@gmail.com] -* Added that Dispatcher exceptions should not be shown to the user unless a default log has not been configured. Instead show public/500.html [DHH] +* Added that Dispatcher exceptions should not be shown to the user unless a default log has not been configured. Instead show public/500.html [David Heinemeier Hansson] * Fixed that rake clone_structure_to_test should quit on pgsql if the dump is unsuccesful #4585 [augustz@augustz.com] @@ -1114,9 +1114,9 @@ References #6031. [Nicholas Seckar] * Install alias so Rails::InfoController is accessible at /rails_info. Closes #4546. [Nicholas Seckar] -* Fixed that spawner should daemonize if running in repeat mode [DHH] +* Fixed that spawner should daemonize if running in repeat mode [David Heinemeier Hansson] -* Added TAG option for rake rails:freeze:edge, so you can say rake rails:freeze:edge TAG=rel_1-1-0 to lock to the 1.1.0 release [DHH] +* Added TAG option for rake rails:freeze:edge, so you can say rake rails:freeze:edge TAG=rel_1-1-0 to lock to the 1.1.0 release [David Heinemeier Hansson] * Applied Prototype $() performance patches (#4465, #4477) and updated script.aculo.us [Sam Stephenson, Thomas Fuchs] @@ -1126,13 +1126,13 @@ References #6031. [Nicholas Seckar] * Fixed rake rails:freeze:gems #4518 [benji@silverinsanity.com] -* Added -f/--freeze option to rails command for freezing the application to the Rails version it was generated with [DHH] +* Added -f/--freeze option to rails command for freezing the application to the Rails version it was generated with [David Heinemeier Hansson] * Added gem binding of apps generated through the rails command to the gems of they were generated with [Nicholas Seckar] -* Added expiration settings for JavaScript, CSS, HTML, and images to default lighttpd.conf [DHH] +* Added expiration settings for JavaScript, CSS, HTML, and images to default lighttpd.conf [David Heinemeier Hansson] -* Added gzip compression for JavaScript, CSS, and HTML to default lighttpd.conf [DHH] +* Added gzip compression for JavaScript, CSS, and HTML to default lighttpd.conf [David Heinemeier Hansson] * Avoid passing escapeHTML non-string in Rails' info controller [Nicholas Seckar] @@ -1191,19 +1191,19 @@ References #6031. [Nicholas Seckar] * Added tracking of database and framework versions in script/about #4088 [charles.gerungan@gmail.com/Rick Olson] -* Added public/javascripts/application.js as a sample since it'll automatically be included in javascript_include_tag :defaults [DHH] +* Added public/javascripts/application.js as a sample since it'll automatically be included in javascript_include_tag :defaults [David Heinemeier Hansson] -* Added socket cleanup for lighttpd, both before and after [DHH] +* Added socket cleanup for lighttpd, both before and after [David Heinemeier Hansson] -* Added automatic creation of tmp/ when running script/server [DHH] +* Added automatic creation of tmp/ when running script/server [David Heinemeier Hansson] -* Added silence_stream that'll work on both STDERR or STDOUT or any other stream and deprecated silence_stderr in the process [DHH] +* Added silence_stream that'll work on both STDERR or STDOUT or any other stream and deprecated silence_stderr in the process [David Heinemeier Hansson] * Added reload! method to script/console to reload all models and others that include Reloadable without quitting the console #4056 [esad@esse.at] -* Added that rake rails:freeze:edge will now just export all the contents of the frameworks instead of just lib, so stuff like rails:update:scripts, rails:update:javascripts, and script/server on lighttpd still just works #4047 [DHH] +* Added that rake rails:freeze:edge will now just export all the contents of the frameworks instead of just lib, so stuff like rails:update:scripts, rails:update:javascripts, and script/server on lighttpd still just works #4047 [David Heinemeier Hansson] -* Added fix for upload problems with lighttpd from Safari/IE to config/lighttpd.conf #3999 [thijs@fngtps.com] +* Added fix for upload problems with lighttpd from Safari/IE to config/lighttpd.conf #3999 [Thijs van der Vossen] * Added test:uncommitted to test changes since last checkin to Subversion #4035 [technomancy@gmail.com] @@ -1217,9 +1217,9 @@ References #6031. [Nicholas Seckar] * Add integration test support to app generation and testing [Jamis Buck] -* Added namespaces to all tasks, so for example load_fixtures is now db:fixtures:load. All the old task names are still valid, they just point to the new namespaced names. "rake -T" will only show the namespaced ones, though [DHH] +* Added namespaces to all tasks, so for example load_fixtures is now db:fixtures:load. All the old task names are still valid, they just point to the new namespaced names. "rake -T" will only show the namespaced ones, though [David Heinemeier Hansson] -* CHANGED DEFAULT: ActiveRecord::Base.schema_format is now :ruby by default instead of :sql. This means that we'll assume you want to live in the world of db/schema.rb where the grass is green and the girls are pretty. If your schema contains un-dumpable elements, such as constraints or database-specific column types, you just got an invitation to either 1) patch the dumper to include foreign key support, 2) stop being db specific, or 3) just change the default in config/environment.rb to config.active_record.schema_format = :sql -- we even include an example for that on new Rails skeletons now. Brought to you by the federation of opinionated framework builders! [DHH] +* CHANGED DEFAULT: ActiveRecord::Base.schema_format is now :ruby by default instead of :sql. This means that we'll assume you want to live in the world of db/schema.rb where the grass is green and the girls are pretty. If your schema contains un-dumpable elements, such as constraints or database-specific column types, you just got an invitation to either 1) patch the dumper to include foreign key support, 2) stop being db specific, or 3) just change the default in config/environment.rb to config.active_record.schema_format = :sql -- we even include an example for that on new Rails skeletons now. Brought to you by the federation of opinionated framework builders! [David Heinemeier Hansson] * Added -r/--repeat option to script/process/spawner that offers the same loop protection as the spinner did. This deprecates the script/process/spinner, so it's no longer included in the default Rails skeleton, but still available for backwards compatibility #3461 [ror@andreas-s.net] @@ -1230,17 +1230,17 @@ References #6031. [Nicholas Seckar] * Added more information to script/plugin's doings to ease debugging #3755 [Rick Olson] -* Changed the default configuration for lighttpd to use tmp/sockets instead of log/ for the FastCGI sockets [DHH] +* Changed the default configuration for lighttpd to use tmp/sockets instead of log/ for the FastCGI sockets [David Heinemeier Hansson] -* Added a default configuration of the FileStore for fragment caching if tmp/cache is available, which makes action/fragment caching ready to use out of the box with no additional configuration [DHH] +* Added a default configuration of the FileStore for fragment caching if tmp/cache is available, which makes action/fragment caching ready to use out of the box with no additional configuration [David Heinemeier Hansson] -* Changed the default session configuration to place sessions in tmp/sessions, if that directory is available, instead of /tmp (this essentially means a goodbye to 9/10 White Screen of Death errors and should have web hosting firms around the world cheering) [DHH] +* Changed the default session configuration to place sessions in tmp/sessions, if that directory is available, instead of /tmp (this essentially means a goodbye to 9/10 White Screen of Death errors and should have web hosting firms around the world cheering) [David Heinemeier Hansson] -* Added tmp/sessions, tmp/cache, and tmp/sockets as default directories in the Rails skeleton [DHH] +* Added tmp/sessions, tmp/cache, and tmp/sockets as default directories in the Rails skeleton [David Heinemeier Hansson] -* Added that script/generate model will now automatically create a migration file for the model created. This can be turned off by calling the generator with --skip-migration [DHH] +* Added that script/generate model will now automatically create a migration file for the model created. This can be turned off by calling the generator with --skip-migration [David Heinemeier Hansson] -* Added -d/--database option to the rails command, so you can do "rails --database=sqlite2 myapp" to start a new application preconfigured to use SQLite2 as the database. Removed the configuration examples from SQLite and PostgreSQL from the default MySQL configuration [DHH] +* Added -d/--database option to the rails command, so you can do "rails --database=sqlite2 myapp" to start a new application preconfigured to use SQLite2 as the database. Removed the configuration examples from SQLite and PostgreSQL from the default MySQL configuration [David Heinemeier Hansson] * Allow script/server -c /path/to/lighttpd.conf [Jeremy Kemper] @@ -1248,13 +1248,13 @@ References #6031. [Nicholas Seckar] * Update script.aculo.us to V1.5.3 [Thomas Fuchs] -* Added SIGTRAP signal handler to RailsFCGIHandler that'll force the process into a breakpoint after the next request. This breakpoint can then be caught with script/breakpointer and give you access to the Ruby image inside that process. Useful for debugging memory leaks among other things [DHH] +* Added SIGTRAP signal handler to RailsFCGIHandler that'll force the process into a breakpoint after the next request. This breakpoint can then be caught with script/breakpointer and give you access to the Ruby image inside that process. Useful for debugging memory leaks among other things [David Heinemeier Hansson] -* Changed default lighttpd.conf to use CWD from lighttpd 1.4.10 that allows the same configuration to be used for both detach and not. Also ensured that auto-repeaping of FCGIs only happens when lighttpd is not detached. [DHH] +* Changed default lighttpd.conf to use CWD from lighttpd 1.4.10 that allows the same configuration to be used for both detach and not. Also ensured that auto-repeaping of FCGIs only happens when lighttpd is not detached. [David Heinemeier Hansson] * Added Configuration#after_initialize for registering a block which gets called after the framework is fully initialized. Useful for things like per-environment configuration of plugins. [Michael Koziarski] -* Added check for RAILS_FRAMEWORK_ROOT constant that allows the Rails framework to be found in a different place than vendor/rails. Should be set in boot.rb. [DHH] +* Added check for RAILS_FRAMEWORK_ROOT constant that allows the Rails framework to be found in a different place than vendor/rails. Should be set in boot.rb. [David Heinemeier Hansson] * Fixed that static requests could unlock the mutex guarding dynamic requests in the WEBrick servlet #3433 [tom@craz8.com] @@ -1272,7 +1272,7 @@ References #6031. [Nicholas Seckar] * Fix typo in mailer generator USAGE. #3458 [chriztian.steinmeier@gmail.com] -* Ignore version mismatch between pg_dump and the database server. #3457 [simon.stapleton@gmail.com] +* Ignore version mismatch between pg_dump and the database server. #3457 [Simon Stapleton] * Reap FCGI processes after lighttpd exits. [Sam Stephenson] @@ -1304,11 +1304,11 @@ References #6031. [Nicholas Seckar] * Have the lighttpd server script report the actual ip to which the server is bound. #2903. [Adam] -* Add plugin library directories to the load path after the lib directory so that libraries in the lib directory get precedence. #2910. [james.adam@gmail.com] +* Add plugin library directories to the load path after the lib directory so that libraries in the lib directory get precedence. #2910. [James Adam] * Make help for the console command more explicit about how to specify the desired environment in which to run the console. #2911. [anonymous] -* PostgreSQL: the purge_test_database Rake task shouldn't explicitly specify the template0 template when creating a fresh test database. #2964 [dreamer3@gmail.com] +* PostgreSQL: the purge_test_database Rake task shouldn't explicitly specify the template0 template when creating a fresh test database. #2964 [Dreamer3] * Introducing the session_migration generator. Creates an add_session_table migration. Allows generator to specify migrations directory. #2958, #2960 [Rick Olson] @@ -1326,19 +1326,19 @@ References #6031. [Nicholas Seckar] * Make sure that legacy db tasks also reference :database for SQLite #2830 [kazuhiko@fdiary.net] -* Pass __FILE__ when evaluating plugins' init.rb. #2817 [james.adam@gmail.com] +* Pass __FILE__ when evaluating plugins' init.rb. #2817 [James Adam] * Better svn status matching for generators. #2814 [François Beausoleil <francois.beausoleil@gmail.com>, Blair Zajac <blair@orcaware.com>] -* Don't reload routes until plugins have been loaded so they have a chance to extend the routing capabilities [DHH] +* Don't reload routes until plugins have been loaded so they have a chance to extend the routing capabilities [David Heinemeier Hansson] * Don't detach or fork for script/server tailing [Nicholas Seckar] -* Changed all script/* to use #!/usr/bin/env ruby instead of hard-coded Ruby path. public/dispatcher.* still uses the hard-coded path for compatibility with web servers that don't have Ruby in path [DHH] +* Changed all script/* to use #!/usr/bin/env ruby instead of hard-coded Ruby path. public/dispatcher.* still uses the hard-coded path for compatibility with web servers that don't have Ruby in path [David Heinemeier Hansson] -* Force RAILS_ENV to be "test" when running tests, so that ENV["RAILS_ENV"] = "production" in config/environment.rb doesn't wreck havok [DHH] #2660 +* Force RAILS_ENV to be "test" when running tests, so that ENV["RAILS_ENV"] = "production" in config/environment.rb doesn't wreck havok [David Heinemeier Hansson] #2660 -* Correct versioning in :freeze_gems Rake task. #2778 [jakob@mentalized.net, Jeremy Kemper] +* Correct versioning in :freeze_gems Rake task. #2778 [Jakob Skjerning, Jeremy Kemper] * Added an omnipresent RailsInfoController with a properties action that delivers an HTML rendering of Rails::Info (but only when local_request? is true). Added a new default index.html which fetches this with Ajax. [Sam Stephenson] @@ -1353,7 +1353,7 @@ References #6031. [Nicholas Seckar] * Use require_library_or_gem 'fcgi' in script/server [Sam Stephenson] -* Added default lighttpd config in config/lighttpd.conf and added a default runner for lighttpd in script/server (works like script/server, but using lighttpd and FastCGI). It will use lighttpd if available, otherwise WEBrick. You can force either or using 'script/server lighttpd' or 'script/server webrick' [DHH] +* Added default lighttpd config in config/lighttpd.conf and added a default runner for lighttpd in script/server (works like script/server, but using lighttpd and FastCGI). It will use lighttpd if available, otherwise WEBrick. You can force either or using 'script/server lighttpd' or 'script/server webrick' [David Heinemeier Hansson] * New configuration option config.plugin_paths which may be a single path like the default 'vendor/plugins' or an array of paths: ['vendor/plugins', 'lib/plugins']. [Jeremy Kemper] @@ -1379,7 +1379,7 @@ References #6031. [Nicholas Seckar] * Make fcgi handler respond to TERM signals with an explicit exit [Jamis Buck] -* Added demonstration of fixture use to the test case generated by the model generator [DHH] +* Added demonstration of fixture use to the test case generated by the model generator [David Heinemeier Hansson] * If specified, pass PostgreSQL client character encoding to createdb. #2703 [Kazuhiko <kazuhiko@fdiary.net>] @@ -1399,7 +1399,7 @@ References #6031. [Nicholas Seckar] * The PostgreSQL :db_structure_dump Rake task limits its dump to the schema search path in database.yml. [Anatol Pomozov <anatol.pomozov@gmail.com>] -* Add task to generate rdoc for all installed plugins. [Marcel Molina] +* Add task to generate rdoc for all installed plugins. [Marcel Molina Jr.] * Update script.aculo.us to V1.5_rc4 [Thomas Fuchs] @@ -1407,15 +1407,15 @@ References #6031. [Nicholas Seckar] * Migrations may be destroyed: script/destroy migration foo. #2635 [Charles M. Gerungan <charles.gerungan@gmail.com>, Jamis Buck, Jeremy Kemper] -* Added that plugins can carry generators and that generator stub files can be created along with new plugins using script/generate plugin <name> --with-generator [DHH] +* Added that plugins can carry generators and that generator stub files can be created along with new plugins using script/generate plugin <name> --with-generator [David Heinemeier Hansson] -* Removed app/apis as a default empty dir since its automatically created when using script/generate web_service [DHH] +* Removed app/apis as a default empty dir since its automatically created when using script/generate web_service [David Heinemeier Hansson] * Added script/plugin to manage plugins (install, remove, list, etc) [Ryan Tomayko] -* Added test_plugins task: Run the plugin tests in vendor/plugins/**/test (or specify with PLUGIN=name) [DHH] +* Added test_plugins task: Run the plugin tests in vendor/plugins/**/test (or specify with PLUGIN=name) [David Heinemeier Hansson] -* Added plugin generator to create a stub structure for a new plugin in vendor/plugins (see "script/generate plugin" for help) [DHH] +* Added plugin generator to create a stub structure for a new plugin in vendor/plugins (see "script/generate plugin" for help) [David Heinemeier Hansson] * Fixed scaffold generator when started with only 1 parameter #2609 [self@mattmower.com] @@ -1446,7 +1446,7 @@ References #6031. [Nicholas Seckar] *0.14.0 (RC1)* (October 16th, 2005) -* Moved generator folder from RAILS_ROOT/generators to RAILS_ROOT/lib/generators [Tobias Luetke] +* Moved generator folder from RAILS_ROOT/generators to RAILS_ROOT/lib/generators [Tobias Lütke] * Fix rake dev and related commands [Nicholas Seckar] @@ -1457,7 +1457,7 @@ References #6031. [Nicholas Seckar] * Added Rails framework freezing tasks: freeze_gems (freeze to current gems), freeze_edge (freeze to Rails SVN trunk), unfreeze_rails (float with newest gems on system) -* Added update_javascripts task which will fetch all the latest js files from your current rails install. Use after updating rails. [Tobias Luetke] +* Added update_javascripts task which will fetch all the latest js files from your current rails install. Use after updating rails. [Tobias Lütke] * Added cleaning of RAILS_ROOT to useless elements such as '../non-dot-dot/'. Provides cleaner backtraces and error messages. [Nicholas Seckar] @@ -1483,7 +1483,7 @@ References #6031. [Nicholas Seckar] * Make the migration generator only check files ending in *.rb when calculating the next file name #2317 [Chad Fowler] -* Added prevention of duplicate migrations from the generator #2240 [fbeausoleil@ftml.net] +* Added prevention of duplicate migrations from the generator #2240 [François Beausoleil] * Add db_schema_dump and db_schema_import rake tasks to work with the new ActiveRecord::SchemaDumper (for dumping a schema to and reading a schema from a ruby file). @@ -1499,7 +1499,7 @@ References #6031. [Nicholas Seckar] * Added -m/--mime-types option to the WEBrick server, so you can specify a Apache-style mime.types file to load #2059 [ask@develooper.com] -* Added -c/--svn option to the generator that'll add new files and remove destroyed files using svn add/revert/remove as appropriate #2064 [kevin.clark@gmail.com] +* Added -c/--svn option to the generator that'll add new files and remove destroyed files using svn add/revert/remove as appropriate #2064 [Kevin Clark] * Added -c/--charset option to WEBrick server, so you can specify a default charset (which without changes is UTF-8) #2084 [wejn@box.cz] @@ -1531,9 +1531,9 @@ References #6031. [Nicholas Seckar] * Added convenience controls for FCGI processes (especially when managed remotely): spinner, spawner, and reaper. They reside in script/process. More details can be had by calling them with -h/--help. -* Added load_fixtures task to the Rakefile, which will load all the fixtures into the database for the current environment #1791 [Marcel Molina] +* Added load_fixtures task to the Rakefile, which will load all the fixtures into the database for the current environment #1791 [Marcel Molina Jr.] -* Added an empty robots.txt to public/, so that web servers asking for it won't trigger a dynamic call, like favicon.ico #1738 [michael@schubert] +* Added an empty robots.txt to public/, so that web servers asking for it won't trigger a dynamic call, like favicon.ico #1738 [Michael Schubert] * Dropped the 'immediate close-down' of FCGI processes since it didn't work consistently and produced bad responses when it didn't. So now a TERM ensures exit after the next request (just as if the process is handling a request when it receives the signal). This means that you'll have to 'nudge' all FCGI processes with a request in order to ensure that they have all reloaded. This can be done by something like ./script/process/repear --nudge 'http://www.myapp.com' --instances 10, which will load the myapp site 10 times (and thus hit all of the 10 FCGI processes once, enough to shut down). @@ -1544,13 +1544,13 @@ References #6031. [Nicholas Seckar] * Fixed that each request with the WEBrick adapter would open a new database connection #1685 [Sam Stephenson] -* Added support for SQL Server in the database rake tasks #1652 [ken.barker@gmail.com] Note: osql and scptxfr may need to be installed on your development environment. This involves getting the .exes and a .rll (scptxfr) from a production SQL Server (not developer level SQL Server). Add their location to your Environment PATH and you are all set. +* Added support for SQL Server in the database rake tasks #1652 [Ken Barker] Note: osql and scptxfr may need to be installed on your development environment. This involves getting the .exes and a .rll (scptxfr) from a production SQL Server (not developer level SQL Server). Add their location to your Environment PATH and you are all set. * Added a VERSION parameter to the migrate task that allows you to do "rake migrate VERSION=34" to migrate to the 34th version traveling up or down depending on the current version -* Extend Ruby version check to include RUBY_RELEASE_DATE >= '2005-12-25', the final Ruby 1.8.2 release #1674 [court3nay@gmail.com] +* Extend Ruby version check to include RUBY_RELEASE_DATE >= '2005-12-25', the final Ruby 1.8.2 release #1674 [court3nay] -* Improved documentation for environment config files #1625 [court3nay@gmail.com] +* Improved documentation for environment config files #1625 [court3nay] *0.13.0* (6 July, 2005) @@ -1561,19 +1561,19 @@ References #6031. [Nicholas Seckar] * Added "migrate" as rake task to execute all the pending migrations from db/migrate -* Fixed that model generator would make fixtures plural, even if ActiveRecord::Base.pluralize_table_names was false #1185 [Marcel Molina] +* Fixed that model generator would make fixtures plural, even if ActiveRecord::Base.pluralize_table_names was false #1185 [Marcel Molina Jr.] * Added a DOCTYPE of HTML transitional to the HTML files generated by Rails #1124 [Michael Koziarski] * SIGTERM also gracefully exits dispatch.fcgi. Ignore SIGUSR1 on Windows. -* Add the option to manually manage garbage collection in the FastCGI dispatcher. Set the number of requests between GC runs in your public/dispatch.fcgi [skaes@web.de] +* Add the option to manually manage garbage collection in the FastCGI dispatcher. Set the number of requests between GC runs in your public/dispatch.fcgi [Stefan Kaes] * Allow dynamic application reloading for dispatch.fcgi processes by sending a SIGHUP. If the process is currently handling a request, the request will be allowed to complete first. This allows production fcgi's to be reloaded without having to restart them. * RailsFCGIHandler (dispatch.fcgi) no longer tries to explicitly flush $stdout (CgiProcess#out always calls flush) -* Fixed rakefile actions against PostgreSQL when the password is all numeric #1462 [michael@schubert.cx] +* Fixed rakefile actions against PostgreSQL when the password is all numeric #1462 [Michael Schubert] * ActionMailer::Base subclasses are reloaded with the other rails components #1262 @@ -1587,7 +1587,7 @@ References #6031. [Nicholas Seckar] * Fixed Webrick to escape + characters in URL's the same way that lighttpd and apache do #1397 [Nicholas Seckar] -* Added -e/--environment option to script/runner #1408 [fbeausoleil@ftml.net] +* Added -e/--environment option to script/runner #1408 [François Beausoleil] * Modernize the scaffold generator to use the simplified render and test methods and to change style from @params["id"] to params[:id]. #1367 @@ -1628,7 +1628,7 @@ References #6031. [Nicholas Seckar] * Added lazy typing for generate, such that ./script/generate cn == ./script/generate controller and the likes #1051 [k@v2studio.com] -* Fixed that ownership is brought over in pg_dump during tests for PostgreSQL #1060 [pburleson@gmail.com] +* Fixed that ownership is brought over in pg_dump during tests for PostgreSQL #1060 [pburleson] * Upgraded to Active Record 1.10.0, Action Pack 1.8.0, Action Mailer 0.9.0, Action Web Service 0.7.0, Active Support 1.0.4 @@ -1648,11 +1648,11 @@ References #6031. [Nicholas Seckar] * Added additional error handling to the FastCGI dispatcher to catch even errors taking down the entire process -* Improved the generated scaffold code a lot to take advantage of recent Rails developments #882 [Tobias Luetke] +* Improved the generated scaffold code a lot to take advantage of recent Rails developments #882 [Tobias Lütke] * Combined the script/environment.rb used for gems and regular files version. If vendor/rails/* has all the frameworks, then files version is used, otherwise gems #878 [Nicholas Seckar] -* Changed .htaccess to allow dispatch.* to be called from a sub-directory as part of the push with Action Pack to make Rails work on non-vhost setups #826 [Nicholas Seckar/Tobias Luetke] +* Changed .htaccess to allow dispatch.* to be called from a sub-directory as part of the push with Action Pack to make Rails work on non-vhost setups #826 [Nicholas Seckar/Tobias Lütke] * Added script/runner which can be used to run code inside the environment by eval'ing the first parameter. Examples: @@ -1676,9 +1676,9 @@ References #6031. [Nicholas Seckar] *0.10.1* (7th March, 2005) -* Fixed rake stats to ignore editor backup files like model.rb~ #791 [skanthak] +* Fixed rake stats to ignore editor backup files like model.rb~ #791 [Sebastian Kanthak] -* Added exception shallowing if the DRb server can't be started (not worth making a fuss about to distract new users) #779 [Tobias Luetke] +* Added exception shallowing if the DRb server can't be started (not worth making a fuss about to distract new users) #779 [Tobias Lütke] * Added an empty favicon.ico file to the public directory of new applications (so the logs are not spammed by its absence) @@ -1711,7 +1711,7 @@ References #6031. [Nicholas Seckar] *0.10.0* (24th February, 2005) -* Changed default IP binding for WEBrick from 127.0.0.1 to 0.0.0.0 so that the server is accessible both locally and remotely #696 [Marcel] +* Changed default IP binding for WEBrick from 127.0.0.1 to 0.0.0.0 so that the server is accessible both locally and remotely #696 [Marcel Molina Jr.] * Fixed that script/server -d was broken so daemon mode couldn't be used #687 [Nicholas Seckar] @@ -1778,7 +1778,7 @@ References #6031. [Nicholas Seckar] *0.9.4.1* (January 18th, 2005) -* Added 5-second timeout to WordNet alternatives on creating reserved-word models #501 [Marcel Molina] +* Added 5-second timeout to WordNet alternatives on creating reserved-word models #501 [Marcel Molina Jr.] * Fixed binding of caller #496 [Alexey] @@ -1787,22 +1787,22 @@ References #6031. [Nicholas Seckar] *0.9.4* (January 17th, 2005) -* Added that ApplicationController will catch a ControllerNotFound exception if someone attempts to access a url pointing to an unexisting controller [Tobias Luetke] +* Added that ApplicationController will catch a ControllerNotFound exception if someone attempts to access a url pointing to an unexisting controller [Tobias Lütke] * Flipped code-to-test ratio around to be more readable #468 [Scott Baron] * Fixed log file permissions to be 666 instead of 777 (so they're not executable) #471 [Lucas Carlson] -* Fixed that auto reloading would some times not work or would reload the models twice #475 [Tobias Luetke] +* Fixed that auto reloading would some times not work or would reload the models twice #475 [Tobias Lütke] * Added rewrite rules to deal with caching to public/.htaccess * Added the option to specify a controller name to "generate scaffold" and made the default controller name the plural form of the model. * Added that rake clone_structure_to_test, db_structure_dump, and purge_test_database tasks now pick up the source database to use from - RAILS_ENV instead of just forcing development #424 [Tobias Luetke] + RAILS_ENV instead of just forcing development #424 [Tobias Lütke] -* Fixed script/console to work with Windows (that requires the use of irb.bat) #418 [octopod] +* Fixed script/console to work with Windows (that requires the use of irb.bat) #418 [Chris McGrath] * Fixed WEBrick servlet slowdown over time by restricting the load path reloading to mod_ruby diff --git a/railties/lib/commands/server.rb b/railties/lib/commands/server.rb index 7057fcc33f..43b18004c0 100644 --- a/railties/lib/commands/server.rb +++ b/railties/lib/commands/server.rb @@ -84,7 +84,7 @@ else end app = Rack::Builder.new { - use Rails::Rack::Logger + use Rails::Rack::LogTailer unless options[:detach] use Rails::Rack::Static use Rails::Rack::Debugger if options[:debugger] run inner_app diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 56e8ce95ab..637fe74313 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -155,6 +155,8 @@ module Rails initialize_framework_settings initialize_framework_views + initialize_metal + add_support_load_paths load_gems @@ -533,6 +535,10 @@ Run `rake gems:install` to install the missing gems. end end + def initialize_metal + configuration.middleware.use Rails::Rack::Metal + end + # Initializes framework-specific settings for each of the loaded frameworks # (Configuration#frameworks). The available settings map to the accessors # on each of the corresponding Base classes. @@ -915,6 +921,7 @@ Run `rake gems:install` to install the missing gems. # Followed by the standard includes. paths.concat %w( app + app/metal app/models app/controllers app/helpers @@ -933,6 +940,7 @@ Run `rake gems:install` to install the missing gems. def default_eager_load_paths %w( + app/metal app/models app/controllers app/helpers diff --git a/railties/lib/rails/rack.rb b/railties/lib/rails/rack.rb index 90535674e9..9705f65e52 100644 --- a/railties/lib/rails/rack.rb +++ b/railties/lib/rails/rack.rb @@ -1,7 +1,8 @@ module Rails module Rack autoload :Debugger, "rails/rack/debugger" - autoload :Logger, "rails/rack/logger" + autoload :LogTailer, "rails/rack/log_tailer" + autoload :Metal, "rails/rack/metal" autoload :Static, "rails/rack/static" end end diff --git a/railties/lib/rails/rack/cascade.rb b/railties/lib/rails/rack/cascade.rb new file mode 100644 index 0000000000..d5af7fc77e --- /dev/null +++ b/railties/lib/rails/rack/cascade.rb @@ -0,0 +1,31 @@ +require 'active_support/ordered_hash' + +module Rails + module Rack + # Try a request on several apps; return the first non-404 response. + class Cascade + attr_reader :apps + + def initialize(apps) + @apps = ActiveSupport::OrderedHash.new + apps.each { |app| add app } + end + + def call(env) + @apps.keys.each do |app| + result = app.call(env) + return result unless result[0].to_i == 404 + end + Metal::NotFoundResponse + end + + def add(app) + @apps[app] = true + end + + def include?(app) + @apps.include?(app) + end + end + end +end diff --git a/railties/lib/rails/rack/log_tailer.rb b/railties/lib/rails/rack/log_tailer.rb new file mode 100644 index 0000000000..a237cee6bc --- /dev/null +++ b/railties/lib/rails/rack/log_tailer.rb @@ -0,0 +1,35 @@ +module Rails + module Rack + class LogTailer + EnvironmentLog = "#{File.expand_path(Rails.root)}/log/#{Rails.env}.log" + + def initialize(app, log = nil) + @app = app + + path = Pathname.new(log || EnvironmentLog).cleanpath + @cursor = ::File.size(path) + @last_checked = Time.now.to_f + + @file = ::File.open(path, 'r') + end + + def call(env) + response = @app.call(env) + tail_log + response + end + + def tail_log + @file.seek @cursor + + mod = @file.mtime.to_f + if mod > @last_checked + contents = @file.read + @last_checked = mod + @cursor += contents.size + $stdout.print contents + end + end + end + end +end diff --git a/railties/lib/rails/rack/logger.rb b/railties/lib/rails/rack/logger.rb deleted file mode 100644 index 89d02e45a9..0000000000 --- a/railties/lib/rails/rack/logger.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Rails - module Rack - class Logger - EnvironmentLog = "#{File.expand_path(Rails.root)}/log/#{Rails.env}.log" - - def initialize(app, log = nil) - @app = app - @path = Pathname.new(log || EnvironmentLog).cleanpath - @cursor = ::File.size(@path) - @last_checked = Time.now - end - - def call(env) - response = @app.call(env) - ::File.open(@path, 'r') do |f| - f.seek @cursor - if f.mtime > @last_checked - contents = f.read - @last_checked = f.mtime - @cursor += contents.length - print contents - end - end - response - end - end - end -end diff --git a/railties/lib/rails/rack/metal.rb b/railties/lib/rails/rack/metal.rb new file mode 100644 index 0000000000..1df31a1594 --- /dev/null +++ b/railties/lib/rails/rack/metal.rb @@ -0,0 +1,27 @@ +require 'rails/rack/cascade' + +module Rails + module Rack + module Metal + NotFoundResponse = [404, {}, []].freeze + NotFound = lambda { NotFoundResponse } + + class << self + def new(app) + Cascade.new(builtins + [app]) + end + + def builtins + base = "#{Rails.root}/app/metal" + matcher = /\A#{Regexp.escape(base)}\/(.*)\.rb\Z/ + + Dir["#{base}/**/*.rb"].sort.map do |file| + file.sub!(matcher, '\1') + require file + file.classify.constantize + end + end + end + end + end +end diff --git a/railties/lib/rails_generator/generators/components/metal/USAGE b/railties/lib/rails_generator/generators/components/metal/USAGE new file mode 100644 index 0000000000..123ec6c03f --- /dev/null +++ b/railties/lib/rails_generator/generators/components/metal/USAGE @@ -0,0 +1,8 @@ +Description: + Cast some metal! + +Examples: + `./script/generate metal poller` + + This will create: + Metal: app/metal/poller.rb diff --git a/railties/lib/rails_generator/generators/components/metal/metal_generator.rb b/railties/lib/rails_generator/generators/components/metal/metal_generator.rb new file mode 100644 index 0000000000..64f49d929d --- /dev/null +++ b/railties/lib/rails_generator/generators/components/metal/metal_generator.rb @@ -0,0 +1,8 @@ +class MetalGenerator < Rails::Generator::NamedBase + def manifest + record do |m| + m.directory 'app/metal' + m.template 'metal.rb', File.join('app/metal', "#{file_name}.rb") + end + end +end diff --git a/railties/lib/rails_generator/generators/components/metal/templates/metal.rb b/railties/lib/rails_generator/generators/components/metal/templates/metal.rb new file mode 100644 index 0000000000..e94982b69a --- /dev/null +++ b/railties/lib/rails_generator/generators/components/metal/templates/metal.rb @@ -0,0 +1,12 @@ +# Allow the metal piece to run in isolation +require(File.dirname(__FILE__) + "/../../config/environment") unless defined?(Rails) + +class <%= class_name %> + def self.call(env) + if env["PATH_INFO"] =~ /^\/<%= file_name %>/ + [200, {"Content-Type" => "text/html"}, ["Hello, World!"]] + else + [404, {"Content-Type" => "text/html"}, ["Not Found"]] + end + end +end diff --git a/railties/lib/tasks/middleware.rake b/railties/lib/tasks/middleware.rake index e0dcf50307..05f159184e 100644 --- a/railties/lib/tasks/middleware.rake +++ b/railties/lib/tasks/middleware.rake @@ -1,6 +1,6 @@ desc 'Prints out your Rack middleware stack' task :middleware => :environment do - ActionController::Dispatcher.middleware.each do |middleware| + ActionController::Dispatcher.middleware.active.each do |middleware| puts "use #{middleware.inspect}" end puts "run ActionController::Dispatcher.new" |