Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
Commits on Mar 24, 2009
@josh josh just kill brittle test c919127
Peter Marklund Reset request_parameters in TestRequest#recycle! to avoid multiple po…
…sts clobbering each other [#2271 state:resolved]

Signed-off-by: Joshua Peek <>
@ddollar ddollar Updates tests to cause the tests for the Request class not to proxy t…
…hrough a fake TestRequest object [#2278 state:resolved]

Signed-off-by: Joshua Peek <>
@thedarkone thedarkone Simplify handling of absolute path templates. [#2276 state:resolved]
Signed-off-by: Joshua Peek <>
@thedarkone thedarkone Fix template extension parsing. [#2315 state:resolved] [#2284 state:r…

Signed-off-by: Joshua Peek <>
@ryana ryana adding session_options initialization and test [#2303 state:resolved]
Signed-off-by: Joshua Peek <>
Commits on Apr 07, 2009
@yairgo yairgo added tests for session options being defaulted correctly to rack def…
…aults [#2403 state:resolved]

Signed-off-by: Joshua Peek <>
@dmcinnes dmcinnes Fix for TestResponse.cookies returning cookies unescaped [#1867 state…

Signed-off-by: David Heinemeier Hansson <>
Commits on Apr 16, 2009
@dhh dhh Added ActiveRecord::Base#touch to update the updated_at/on attributes…
… with the current time [DHH]
@dhh dhh Added :touch option to belongs_to associations that will touch the pa…
…rent record when the current record is saved or destroyed [DHH]
Commits on Apr 17, 2009
@jeremy jeremy Clearer String#first and #last edge cases. Fix that foo.first(0) == i…
…nstead of foo.
Commits on Apr 18, 2009
@mislav mislav Improve rewindable input test coverage so tests fail when you remove …
…the middleware

Signed-off-by: Joshua Peek <>
@mislav mislav Always buffer rack.input if it is not rewindable
Signed-off-by: Joshua Peek <>
Commits on Apr 20, 2009
@lifo lifo Ensure JoinAssociation uses aliased table name when multiple associat…
…ions have hash conditions on the same table
Commits on Apr 21, 2009
@lifo lifo Ensure :dependent => :delete_all works for association with hash cond…
@maxlapshin maxlapshin Support multiple schemas in table names for postgresql [#390 state:re…

Signed-off-by: Pratik Naik <>
@maxlapshin maxlapshin Fixed wrong quoting of index names in postgres [#2402 state:resolved]
Signed-off-by: Tarmo Tänav <>
@woods woods Quote table names when casting to regclass so that capitalized tables…
… are supported. [#2418 state:resolved]

Signed-off-by: Tarmo Tänav <>
@maxlapshin maxlapshin Fixed dumping from postgresql columns in index in wrong order. [#2515

Signed-off-by: Tarmo Tänav <>
@lifo lifo Fix tests for sqlite3 3.6.xx 3267097
@lifo lifo Specify :group with the table name for it to work on sqlite3 5bbd097
@lifo lifo Change table to prevent copying indexes on sqlite2 09a976a
Commits on Apr 22, 2009
@jeremy jeremy Merge branch '2-3-stable' of into 2-3-stable 617d7eb
Commits on Apr 25, 2009
@josh josh Remove pending rack specifications until they are official 2d9b457
@josh josh Remove vendored version of Rack 16f36b6
@josh josh Remove RewindableInput middleware since all input MUST be rewindable …
…according to a recent change in the Rack 1.0 SPEC
@wycats wycats Updated 2-3-stable to Rack 1.0 cb9a1f1
Commits on Apr 26, 2009
@FooBarWidget FooBarWidget Remove reference to Rack::RewindableInput, which has been removed a w…
…hile ago.

Signed-off-by: Joshua Peek <>
@FooBarWidget FooBarWidget Fix environment variable testing code in failsafe.rb.
Signed-off-by: Joshua Peek <>
@stepheneb stepheneb add JRuby-JDOM backend for XmlMini
Signed-off-by: Jeremy Kemper <>
Commits on Apr 29, 2009
@ddollar ddollar Attempt to deal with more cases of gems with native components.
This commit adds a rudimentary check for 'unbuilt' gems, so that we can abort
the application load if there are any gems that have native components that
have not yet been built.

The rake task gems:build has now only builds 'unbuilt' gems as a result.

The rake task gems:build:force has been added to deal with cases of incomplete
builds, or any case where you need to force the build of all of your gems.

Changes the gems:build task to get its gem list by parsing directory entries
in vendor/gems, which sidesteps the chicken/egg issues involved with having a
gem unpacked into vendor/gems without before its native bits are compiled.

[#2266 state:committed]

Signed-off-by: Jeremy Kemper <>
@ddollar ddollar Additional tests for the gem subsystem
* test_gem_ignores_development_dependencies
  * test_gem_guards_against_duplicate_unpacks
  * test_gem_does_not_unpack_framework_gems

[#2236 state:committed]

Signed-off-by: Jeremy Kemper <>
Commits on Apr 30, 2009
@jeremy jeremy Fix render :json => nil [#2589 state:resolved] 7c4b325
@johndouthat johndouthat Fix action-cached exception responses.
Methods raising ActiveRecord::RecordNotFound were returning 404 on first request and 200 OK with blank body on subsequent requests.

[#2533 state:committed]

Signed-off-by: Jeremy Kemper <>
@jeremy jeremy Missed commit for 7c4b325 a5ed7ee
Commits on May 01, 2009
@shurikp shurikp Default scope :order should be overridden by named scopes.
[#2346 state:committed]

Signed-off-by: Jeremy Kemper <>
@rubyruy rubyruy Fixed bug with polymorphic has_one :as pointing to an STI record
[#2594 state:committed]

Signed-off-by: Jeremy Kemper <>
@rubyruy rubyruy Added routing test for irregular ID requirements and custom member ac…

[#2595 state:committed]

Signed-off-by: Jeremy Kemper <>
Commits on May 04, 2009
codebrulee Remove stray underscore from the hash conversion methods which broke …
…backwards compatibility with Hash.from_xml

Also add an all-caps test to prevent future regressions
Commits on May 05, 2009
@timocratic timocratic fix problems with requires in metal choking under development reloadi…
…ng [#2579 state:resolved]

Signed-off-by: Joshua Peek <>
@wincent wincent Extract ActionController::Caching::Sweeper into separate file [#1977

Signed-off-by: Joshua Peek <>
@josh josh Deprecate assert_redirect_to's partial hash matching. This will be fu…
…lly removed in 3.0.
Commits on May 08, 2009
@josh josh Don't stream each line of the body, just send the whole thing e61cceb
Commits on May 10, 2009
@metaskills metaskills ActiveSupport::OrderedHash#to_a method returns an ordered set of arra…
…ys. Matches ruby1.9's Hash#to_a.

Signed-off-by: Michael Koziarski <>
[#2629 state:committed]
@JohnSmall JohnSmall Add configuration options for :dasherize and :camelize calls to Hash#…

People using ActiveResource & REST to integrate with other systems need to be able to control the default dasherize behavior of Hash.to_xml.
Currently there is no test for a default value, but existing code asssumes it's true. This patch adds tests for the default value and adds
mattr_accessor to ActiveSupport for :dasherize_xml and :camelize_xml. These module attributes set the defaults for :dasherize and :camelize in
rename_keys inside Hash#to_xml. The tests have been changed to separate out the testing of the parameter options for :camelize
and :dasherize so that we only test one thing at a time. We also test default values for :camelize_xml and :dasherize_xml.

The module attribute dasherize_xml is set to true in this patch to maintain existing code. But at some point in the future it should be set to
false because Hash#to_xml probably should not set underscores to dashes by default.

Changed documentation on ActiveResource#to_xml to correctly describe the behaviour of Hash#to_xml. The previous documentation said that
the default for :dasherize was false, in fact it was and still is true, but we now have a way to change the default. I've also added
documentation for the :camelize option.

Signed-off-by: Michael Koziarski <>
@anthonycrumley anthonycrumley Fixed eager load error on find with include => [:table_name] and hash…
… conditions like {:table_name => {:column => 'value'}}

Signed-off-by: Michael Koziarski <>
@josh josh Fix syntax error from 5ac05f1 4051dd3
Commits on May 11, 2009
@dougal dougal ActiveSupport::OrderedHash[1,2,3,4] creates an OrderedHash instead of…
… a Hash.

[#2615 state:committed]

Signed-off-by: Jeremy Kemper <>
@jeremy jeremy Revert "Fixed bug with polymorphic has_one :as pointing to an STI rec…

[#2594 state:open]

This reverts commit 93c5578.
Commits on May 14, 2009
Peter Marklund Changed ActiveRecord::Base#exists? to invoke find_initial so that it …
…is compatible with, and doesn't lose, :include scopes (references to eager loaded tables)

Signed-off-by: Michael Koziarski <>
[#2543 state:committed]
@josh josh Sweeper does not belong in Sweeping module f7cb7fc
Commits on May 15, 2009
@josevalim josevalim Allow strings to be sent as collection to select.
Signed-off-by: Michael Koziarski <>
[#2391 state:committed]
Commits on May 16, 2009
@lifo lifo Include guides directory in the rails gem ba92e83
Commits on May 17, 2009
@dguettler dguettler has_one :through should not create a new association when assigned nil [
#698 state:resolved]

Signed-off-by: Pratik Naik <>
Jacob Kjeldahl Supply valid ruby-prof parameters [#1804 state:resolved]
Signed-off-by: Pratik Naik <>
@phss phss Fix typo in the generated routes.rb [#2433 state:resolved]
Signed-off-by: Pratik Naik <>
@hardbap hardbap Allow assert_template to take a symbol [#2011 state:resolved]
Signed-off-by: Pratik Naik <>
@josh josh Fix reset_session with ActiveRecord store [#2200 state:resolved] e30016c
@josh josh Missed a file from the previous commit 43e537b
Commits on May 18, 2009
@technoweenie technoweenie Add pluggable JSON backends with support for the JSON gem.
    Example: ActiveSupport::JSON.backend = "JSONGem"

All internal Rails JSON encoding is now handled by
ActiveSupport::JSON.encode().  Use of #to_json is not recommended, as it
may clash with other libraries that overwrite it.  However, you can
recover Rails specific functionality
if you really want to use #to_json.

    gem 'json'
    ActiveSupport::JSON.backend = "JSONGem"

    class ActiveRecord::Base
      alias to_json rails_to_json
@jeremy jeremy Only Object to_json alias is needed. Prefer nil options. cc47d3f
@jeremy jeremy Extract json string escaping 5b80ead
@technoweenie technoweenie load the JSON Backend lazily. 2b5e4f3
@lifo lifo Ensure HTTP Digest auth uses appropriate HTTP method [#2490 state:res…
…olved] [Steve Madsen]
@lifo lifo Make sure default_scope#create checks for options[:conditions] [#2181
…state:resolved] [James Le Cuirot]
Luca Guidi Ensure HasManyThroughAssociation#destroy delete orphan records [#2251

Signed-off-by: Pratik Naik <>
@metaskills metaskills Reimplement Fixtures.identify so that it consistently generates ident…
…ities across ruby versions.

[#2633 state:committed]

Signed-off-by: Jeremy Kemper <>
@joevandyk joevandyk Add ability to get multiple memcached keys at the same time (via MemC…

Signed-off-by: Jeremy Kemper <>
@jeremy jeremy Fix imprecise float comparison 9fcadcb
Commits on May 19, 2009
@brynary brynary Allow MemCacheStore to be initialized with a MemCache object instead …
…of addresses and options
@jeremy jeremy Mark pending release in changelog instead of edge 2a65772
@brynary brynary Use duck typing to also allow MemCache-like object when initializing …
…a MemCacheStore

Signed-off-by: Jeremy Kemper <>
Commits on May 20, 2009
@alloy alloy Ensure the parent record is always saved when the child is invalid. [#…
…2249 state:resolved]

Signed-off-by: Pratik Naik <>
Commits on May 25, 2009
@FooBarWidget FooBarWidget activesupport/json/encoders fix that to_json should call rails_to_jso…
…n, not just be an alias to the rails_to_json method defined in Object. Fixes #2690

Signed-off-by: Pratik Naik <>
Commits on May 27, 2009
@josh josh Ensure Memcache local cache returns duplicated values [#2302 state:re…
@calavera calavera ensure initialize_database_middleware doesn't use ActionController if…
… action_controller framework is not enabled [#2680 state:resolved]

Signed-off-by: Joshua Peek <>
@FooBarWidget FooBarWidget Make the Failsafe middleware attempt to render 500.html during failsa…
…fe response rendering. Also make the default static failsafe response more friendly, in case 500.html rendering fails. [#2715 state:resolved]

Signed-off-by: Joshua Peek <>
Commits on May 28, 2009
@js js The FlashHash and friends causes a lot of needless session storing, w…
…hen we know for a fact that there's no content in the flash. By not storing the empty hash in the session we save a lot of communication with the various session backends, while still keeping the same interface to the flash. [#2703 state:resolved]

Signed-off-by: Joshua Peek <>
@js js Only save the session if we're actually writing to it [#2703 state:re…

Signed-off-by: Joshua Peek <>
Commits on May 30, 2009
@josh josh Revert "Only save the session if we're actually writing to it [#2703

This reverts commit 14edaa1.
Commits on Jun 01, 2009
@NZKoz NZKoz Revert "Ensure calculations respect scoped :select". Broke .count on …
…a has_many :through association.

This reverts commit 6543426.
@ianterrell ianterrell added a failing test case for counting has_many :through associations…
… with scopes

Signed-off-by: Michael Koziarski <>
@han han fix for IE incompatibility of :disable_with in submit_tag
Signed-off-by: Michael Koziarski <>
@NZKoz NZKoz name is case sensitive, update tests to reflect that b600bf2
Commits on Jun 06, 2009
@timocratic timocratic Work around a gem dependency edge case that prevents Rails from booti…

If you have a frozen gem with unfrozen dependencies (for instance if the
dependency has native extensions so can't be frozen) you can have a
nightmare upgrade problem, where you cannot rake gems:install, because
rake is broken by a gem loading problem.

If you bump up your frozen gem to a newer version that requires a newer
dependency, everybody else on the team will have rake broken by that
dependency mismatch, since you will have had to specify the dependency
in your config.gems, otherwise nobody will have installed it, since the
parent is frozen. And now the config.gems loading code will kill rake.

[#2609 state:committed]

Signed-off-by: Jeremy Kemper <>
Commits on Jun 08, 2009
@jeremy jeremy Don't rely on Rails.logger 4b4164e
@jeremy jeremy Revert rails_to_json -> to_json so we don't break compatibility
[#2753 state:resolved]
@jeremy jeremy JSON: split encoding and coercion a69ee11
@jeremy jeremy Use to_json instead of rails_to_json 01f820c
@jeremy jeremy Ruby 1.9: fix json encoding ec10f13
Commits on Jun 09, 2009
@jeremy jeremy Integration tests use Rack::Lint on 1.9 also aebd1ba
@jeremy jeremy Check for to_str instead of String 05abd7c
@jeremy jeremy Failsafe doesn't return bare String body 91fbdfd
@jeremy jeremy Ruby 1.9: sqlite escape encoding 91727ae
@jeremy jeremy Lazier Rakefile requires to avoid needing full rake gem on 1.9 cc5d313
@jeremy jeremy Add #element and #collection to ModelName f1e75e4
@jeremy jeremy Simplify json decoder backend lazy load 74f16a5
@jeremy jeremy Prefer JSON.encode(value) to value.to_json 756e82d
@jeremy jeremy Qualify constant references in BasicObjects f9b2227
@jeremy jeremy Fix AR json encoding 63d0c33
@jeremy jeremy Clearer String#first and #last edge cases. Fix that 'foo'.first(0) ==…
… 'foo' instead of ''
@lifo lifo Vendor Rack edge ( commit : 815342a8e15db564b766f209ffb1e340233f064f ) 5fb66a3
nate A test to show that http_authentication needs to fail authentication …
…if the password procedure returns nil. Also includes a fix to validate_digest_response to fail validation if the password procedure returns nil.

Signed-off-by: Michael Koziarski <>
@al2o3cr al2o3cr Fix several issues with the 2.3.2 gem loader.
Incorporates the following:

- migrates back small change to gems:build:force from bfc1609 to finish closing #2266.

- unrolls to_proc calls in gems.rake, to match the change in master.

- fixes #2722 by passing the options hash to dependencies during build. (includes a test)

- fixes #2721 by loading the specification directly in from_directory_name. Adds an option to opt-out of specification loading when needed (in gems:refresh_specs, for instance). Includes tests.

- fixes #2679 by refreshing specs for all frozen gems rather than just gems loaded from the environment.

- fixes #2678 by passing the options hash to dependencies during unpack.

Signed-off-by: Michael Koziarski <>
@NZKoz NZKoz Revert "Ensure HasManyThroughAssociation#destroy delete orphan records"
This reverts commit 7a85927.

There's still some debate about the intended behaviour in the ticket, leaving in master but removing prior to shipping 2.3.3
@tomafro tomafro Change autoload declaration in ActionView::Helpers from JavascriptHel…
…per to JavascriptHelper, matching the actual helper name. Also removed require from UrlHelper which was inadvertently preventing the autoload typo from causing a failure.

Signed-off-by: Michael Koziarski <>
@libc libc PostgreSQL adapter should call thread safe quote_string function
Signed-off-by: Michael Koziarski <>
@steveluscher steveluscher Fixes #2439. ActionController::Integration::Session no longer mangles…
… multiparameter attribute params when processing multipart requests.

Signed-off-by: Michael Koziarski <>
Friedrich Göpel 1.9 compatibility - don't pass an array as the from address as this e…
…nds up generating invalid SMTP commands.
@dsboulder dsboulder Made label target radio button tags with values. Radio button now res…
…pects inherited :index options when generating id.

Signed-off-by: Michael Koziarski <>
Stephen Anderson Sanitized the id generated by text_area_tag helper method. text_area_…
…tag('item[description]') should return: <textarea id="item_description" name="item[description]"></textarea> instead of: <textarea id="item[description]" name="item[description]"></textarea> The old id was causing HTML validation failures.

Signed-off-by: Michael Koziarski <>
@al2o3cr al2o3cr Fix incorrect specification path in GemDependency#from_directory_name
Signed-off-by: Michael Koziarski <>
Commits on Jun 10, 2009
@NZKoz NZKoz Whitelist the methods which are called by multiparameter attribute as…

This prevents users from causing NoMethodErrors and the like by editing the parameter names, and closes a potential exploit of CVE-2009-1904.
@jeremy jeremy Remove dead AbstractRequest autoload 7e1bcef
Commits on Jun 11, 2009
@akaspick akaspick allow absolute paths for the asset caches
Signed-off-by: Michael Koziarski <>
Commits on Jun 12, 2009
@josh josh Vendor rack 1.0.x stable 25fde77
@jeremy jeremy Update memcache-client to 1.7.4 for cheaper timeouts cb9429a
Commits on Jun 13, 2009
Luca Guidi Bytes calculation speed up
[#2800 state:committed]

Signed-off-by: Jeremy Kemper <>
Commits on Jun 15, 2009
@josh josh Add :concat option to asset tag helpers to force concatenation.
This is useful for working around IE's stylesheet limit.

  stylesheet_link_tag :all, :concat => true
Commits on Jun 18, 2009
@jeremy jeremy Delegated methods report the expected file/line in backtraces b75bc05
Commits on Jun 19, 2009
@jeremy jeremy Friendlier runtime exception if delegatee is nil 8b9b954
@jeremy jeremy Turn on autolist for debugging also 2255474
Commits on Jun 25, 2009
@josh josh send_data should set Content-Length as a string 6720b25
Commits on Jun 27, 2009
@NZKoz NZKoz Make filter_parameters work correctly with array parameters.

@chrismear chrismear Make text_area_tag escape contents by default.
Signed-off-by: Michael Koziarski <>
Commits on Jul 01, 2009
Yehuda Katz + Carl Lerche Accept Symbol for contoller name [#2855 state:resolved]
Signed-off-by: Yehuda Katz + Carl Lerche <>
Yehuda Katz + Carl Lerche Move mocha down below initial T::U require and bump version to 0.9.7 [#…
…2858 state:resolved]
@jeremy jeremy Merge branch '2-3-stable' of into 2-3-stable dfdf8e5
Yehuda Katz + Carl Lerche Updates CI to use latest mocha 97ad936
@jeremy jeremy JSON.escape returns UTF-8 strings
[#2849 state:resolved]
Commits on Jul 02, 2009
Yehuda Katz + Carl Lerche Fixes bug where Memcached connections get corrupted when an invalid e…
…xpire is passed in [#2854 state:resolved]
@mcmire mcmire Patch FormTagHelper so that when a form tag is created, the div which…
… holds the form authenticity token is set to display:inline [#2846 state:resolved]

Signed-off-by: Yehuda Katz + Carl Lerche <>
@jdhollis jdhollis Only check for built extensions on gem dependencies that are in vendo…
…r/gems. [#2825 state:resolved]

Signed-off-by: Yehuda Katz + Carl Lerche <>
Yehuda Katz + Carl Lerche Fixes a number of tests that inexplicably didn't fail when we committ…
…ed the original patch
@levinalex levinalex make #inspect if zero length duration return '0 seconds' instead of e…
…mpty string [#2838 state:resolved]

Signed-off-by: Yehuda Katz + Carl Lerche <>
Jarl Friis My suggestion to fix ticket 2401 [#2401 state:resolved]
Signed-off-by: Yehuda Katz + Carl Lerche <>
@brewski brewski Fixed ActiveSupport::OrderedHash::[] work identically to ::Hash::[] i…
…n ruby 1.8.7 [#2832 state:resolved]

Signed-off-by: Yehuda Katz + Carl Lerche <>
@blaxter blaxter Allow symbols on routes declaration (:controller and :action values) [#…
…2828 state:resolved]

Signed-off-by: Yehuda Katz + Carl Lerche <>
Commits on Jul 07, 2009
@FooBarWidget FooBarWidget Mocha >= 0.9.7 is required, otherwise mocking doesn't work. [#2874 st…

Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local>
@FooBarWidget FooBarWidget Add support for dumping non-standard primary keys when using the SQLi…
…te3 adapter. Fix unit tests so that this feature is tested for all adapters.

Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local>
Commits on Jul 08, 2009
@lawrencepit lawrencepit Use the i18n gem if present instead of vendor code. [#2871 state:reso…

Signed-off-by: Yehuda Katz <>
@FooBarWidget FooBarWidget Cleanup application after #close has been called on the Rack response…
… body, not when AC::Reload#call is done.

The Rack body might lazily evaluate its output, which is for example the case
if one calls 'render :text => lambda { ... }'. The code which lazily evaluates
the output might use other application classes. So we will want to defer
cleanup until the Rack request is completely finished.

Signed-off-by: Michael Koziarski <>
@NZKoz NZKoz Match tests with new reloading behaviour 6a50d6c
Commits on Jul 12, 2009
@NZKoz NZKoz Prepare version numbers, changelogs and gem dependencies for 2.3.3. 18e68d9
Commits on Jul 13, 2009
@josh josh Go back to depending on Rack 1.0.x gem f36d9a6
@josh josh Correctly setup the rack gem dependency. ae85927
Commits on Jul 16, 2009
@szimek szimek Add primary_key option to belongs_to association
[#765 state:committed]

Signed-off-by: Jeremy Kemper <>
@NZKoz NZKoz Move from referencing the BlueCloth constant directly, to referencing…
… Markdown.

This supports alternative implementations of markdown such as rpeg-markdown or rdiscount, and later releases of bluecloth.  There are some performance issues with earlier releases of bluecloth, and you should probably upgrade.  In the event that you can't you can place the following code into an initializer:

  Markdown = BlueCloth
Commits on Jul 19, 2009
@NZKoz NZKoz Forgot to bump the railties versions c7bcbb9