Skip to content
This repository
  • 9,977 commits
  • 1,860 files changed
  • 27 comments
  • 62 contributors
This comparison is big! We're only showing the most recent 250 commits
May 01, 2012
Dmitry Vorotilin route Fix #3993 assets:precompile task does not detect index files df84577
Dmitry Vorotilin route Added test for assets:precompile for index files 580e767
May 02, 2012
Piotr Sarnacki drogus Deprecate remove_column with array as an argument 02ca915
Jeremy Kemper jeremy Merge pull request #6095 from route/assets_precompile_task
Fix that asset precompile didn't respect the index.js convention. Fixes #3993.
ebe994f
Francesco Rodríguez frodsan Fix #4979 against 3-2-stable - delete_all raise an error if a limit i…
…s provided
4657dba
May 03, 2012
Andrew White pixeltrix Reset the request parameters after a constraints check
A callable object passed as a constraint for a route may access the request
parameters as part of its check. This causes the combined parameters hash
to be cached in the environment hash. If the constraint fails then any subsequent
access of the request parameters will be against that stale hash.

To fix this we delete the cache after every call to `matches?`. This may have a
negative performance impact if the contraint wraps a large number of routes as the
parameters hash is built by merging GET, POST and path parameters.

Fixes #2510.
(cherry picked from commit 5603050)
7c7fb3a
Jorge Bejar jmbejar Make sure that javascript_include_tag/stylesheet_link_tag methods in
sprockets/helpers/rails_helper.rb discard duplicated assets
0621ecb
May 04, 2012
Nick Ragaz nragaz Add a role option to wrap_parameters.
The role option identifies which parameters are accessible and should be wrapped. The default role is :default.
bfb25f9
Dmitrij Mjakotnyi kucaahbe improvements in "caching_with_rails" guide - backported from docrails
Conflicts:

	railties/guides/source/caching_with_rails.textile
b4ae94f
Vijay Dev vijaydev Merge pull request #6158 from Dagnan/3-2-stable
improvements in "caching_with_rails" guide
5384bdb
Mark J. Titorenko mjtko added beginning_of_hour support to core_ext calculations for Time and…
… DateTime
145cc69
José Valim josevalim Merge pull request #4445 from nragaz/role_based_params_wrapping
specify a role for identifying accessible attributes when wrapping params
efb054b
Aaron Patterson tenderlove Merge pull request #6128 from frodsan/delete_all_limit_32
Fix #4979 against 3-2-stable
80a292c
Piotr Sarnacki drogus Give more detailed instructions in script/rails in engine
closes #4894
915879c
May 05, 2012
Jeremy Kemper jeremy Merge pull request #6170 from mjtko/feature-beginning_of_hour-for-3-2…
…-stable

Backport beginning and end of hour support for Time and DateTime to 3-2-stable
7fb268d
May 07, 2012
Kunal Shah whistlerbrk Add failing test re #3436 which demonstrates content_type is not resp…
…ected when using the :head method/shortcut
6f38348
Kunal Shah whistlerbrk If content_type is explicitly passed to the :head method use the valu…
…e or fallback
4d52738
José Valim josevalim Merge pull request #6198 from whistlerbrk/3-2-stable
Address ActionPack head method not respecting explicitly set content-type #3436
b86e0be
May 08, 2012
Arun Agrawal arunagw locking ruby-prof until we got a fix 764e2de
Santiago Pastorino spastorino Merge pull request #6200 from arunagw/3-2-stable
locking ruby-prof for now.
b12d03d
Francesco Rodríguez frodsan added docs to attribute_accessors methods 96fe0af
Vijay Dev vijaydev Merge pull request #6211 from frodsan/docs_attr_accessor_32stable
Adding docs to attribute accessor methods.
ad4d408
Francesco Rodríguez frodsan removing docs duplication 16a9a87
Vijay Dev vijaydev Merge pull request #6213 from frodsan/cut_docs_dup
Removing attribute_accessor docs duplication
5059c32
May 09, 2012
Francesco Rodríguez frodsan Fix build ba48e23
Francesco Rodríguez frodsan fix attribute_accessors docs to support 1.8 syntax dd7e7b3
Vijay Dev vijaydev Merge pull request #6218 from frodsan/fix_docs_32stable
Fix docs to support 1.8 syntax
cb242a9
Carlos Antonio da Silva carlosantoniodasilva Stop showing deprecations for Ruby 1.8.7 with remove_column
String is Enumerable in 1.8.7, which means that passing a String to
remove_column was generating deprecation warnings during tests.
fa34ace
Andrew White pixeltrix Merge pull request #6223 from carlosantoniodasilva/remove-columns-dep…
…recation-ruby187

Stop showing deprecations for Ruby 1.8.7 with remove_column
381f6e7
Mark J. Titorenko mjtko Bring activesupport CHANGELOG up-to-date/consistent with master. 705a70f
Mark J. Titorenko mjtko Add CHANGELOG section for unreleased Rails 3.2.4; document addition o…
…f #beginning_of_hour and #end_of_hour to Time and DateTime core extensions.
9b777d5
Vijay Dev vijaydev Merge pull request #6228 from mjtko/changelog-fixes-for-3-2-stable
Updated activesupport CHANGELOG [for 3-2-stable]
b003ddf
Piotr Sarnacki drogus Merge pull request #6219 from frodsan/fix_build
Fix build - 3.2
8f5079f
Santiago Pastorino spastorino Merge pull request #6149 from jmbejar/javascript_include_tag_with_not…
…_duplicates

Make sure that javascript_include_tag/stylesheet_link_tag methods don't consider duplicated assets
f8dae86
Jeremy Kemper jeremy Merge pull request #6221 from alexeymuranov/deprecate__instantiate_fi…
…xtures__arity

Deprecate ActiveRecord::Fixtures.instantiate_fixtures unused parameter
22a6072
May 10, 2012
Alexey Muranov alexeymuranov Deprecate ::instantiate_fixtures unused parameter
Deprecate the use of AcitiveRecord::Fixtures::instantiate_fixtures(object, fixture_set_name, fixture_set, load_instances = true), use instead instantiate_fixtures(object, fixture_set, load_instances = true).

To be changed in master branch.
f02e7dc
Alexey Muranov alexeymuranov Remove deprecated use of ::instantiate_fixtures 9810555
Yury Velikanau spectator Make sure TimeoutError is loaded. c2193c1
Jeremy Kemper jeremy Merge pull request #6230 from spectator/active_resource_exceptions
ActiveResource::TimeoutError is not loaded
a9fc8a9
Andrew White pixeltrix Refactor the handling of default_url_options in integration tests
This commit improves the handling of default_url_options in integration
tests by making behave closer to how a real application operates.

Specifically the following issues have been addressed:

* Options specified in routes.rb are used (fixes #546)
* Options specified in controllers are used
* Request parameters are recalled correctly
* Tests can override default_url_options directly
f3aaac4
Andrew White pixeltrix Don't ignore nil positional arguments for url helpers - fixes #6196. 66e338a
Andrew White pixeltrix Return false for exists? with new records - fixes #6199.
(cherry picked from commit fa21b73)
62f098d
May 11, 2012
Arun Agrawal arunagw Update performance profiler to work with latest ruby-prof 9d616ea
Arun Agrawal arunagw Ruby-Prof works with ruby-1.9.3 also. 4b59961
Alexey Muranov alexeymuranov Remove unused private method yaml_fixtures_key 5ecd14c
Santiago Pastorino spastorino Merge pull request #6262 from arunagw/ruby_prof_fix
Ruby prof fix
9cead4a
May 12, 2012
Erich Menge Update 'getting started' guides for new whitelist security implementa…
…tion. Closes #6286.
ccf80c2
Rafael Mendonça França rafaelfranca Merge pull request #6292 from erichmenge/3-2-stable-docfix
3 2 stable guides fix
41e7a2a
Francesco Rodríguez frodsan adding examples and docs 2f4696d
Vijay Dev vijaydev Merge pull request #6294 from frodsan/docs_backport
Adding examples and docs [3-2-stable]
3d0e7ad
May 13, 2012
Guillermo Iguaran guilleiguaran Upgrade sprockets to 2.1.3 62b74b1
Mikhail Dieterle Mik-die :foreign_key option should be on has_many side of association 3f7ed52
Santiago Pastorino spastorino Merge pull request #6299 from guilleiguaran/upgrade-sprockets-3-2-stable
Upgrade sprockets to 2.1.3
8a5b51e
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #6306 from erichmenge/3-2-stable-guide-fix
3 2 stable guide fix [ci skip]
e7d5ba3
Rafael Mendonça França rafaelfranca Merge pull request #3237 from sakuro/data-url-scheme
Support data: url scheme
9ff97b0
Rafael Mendonça França rafaelfranca Deprecate `:mouseover` options for `image_tag` helper. 1aff772
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #6266 from alexeymuranov/remove_unused_private_method
Remove unused private method
9199ddf
May 14, 2012
Egor Homakov homakov Update railties/lib/rails/generators/rails/app/templates/config/appli…
…cation.rb

Signed-off-by: José Valim <jose.valim@gmail.com>
4588684
José Valim josevalim Default escape_html_entities_in_json to true in new apps ec68258
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #6018 from lest/patch-1
mailer can be anonymous
2506d4a
Carlos Galdino + Rafael Mendonça França Deprecate `:disable_with` in favor of `'data-disable-with'` option fo…
…r `button_to` and `submit_tag` helpers.
21141e7
Carlos Galdino + Rafael Mendonça França Fix typo d47d6e7
Carlos Galdino + Rafael Mendonça França Deprecate `:disable_with` for `button_tag` too e9051e2
May 15, 2012
Francesco Rodríguez frodsan Backporting some docs on core_ext/hash b2f73c4
Vijay Dev vijaydev Merge pull request #6321 from frodsan/backport_docs
Backporting docs
007539d
Angelo Capilleri acapilleri clean the errors if an object that includes validations errors is dup…
…ed,for 3-2-stable

It Fixes #5953 in 3-2-stable, it's the same pull request of #6284
396e383
Rafael Mendonça França rafaelfranca Merge pull request #6324 from acapilleri/dup_validation_3_2
Dup validation 3 2
9a868a0
Carlos Antonio da Silva carlosantoniodasilva Fix indent from previous merge 2dfa8b5
Angelo Capilleri add backport for the pull request #6324 e885b18
Rafael Mendonça França rafaelfranca Merge pull request #6329 from acapilleri/backport_dup_validation_3_2
Backport dup validation 3 2
8470fdb
Brian Cardarella bcardarella Changing the indentation level of the block comment close for SASS
If one wants to use use SASS for application.css.sass the comment block indentation is invalid.
9f4c4f6
May 16, 2012
Aaron Patterson tenderlove Merge pull request #6340 from bcardarella/patch-3
Changing the indentation level of the block comment close for Sass
e3033e3
Piotr Sarnacki drogus Fix CollectionAssociation#replace to return new target (closes #6231)
Conflicts:

	activerecord/test/cases/associations/has_many_associations_test.rb
0f43592
May 17, 2012
Francesco Rodríguez frodsan fix validations docs 4bbd05c
Vijay Dev vijaydev Merge pull request #6367 from frodsan/fix_validators_docs
Fix validators docs [3-2-stable]
75e8e77
May 18, 2012
Jeremy Walker iHiD Deprecate old APIs for highlight, excerpt and word_wrap 616c91d
Rafael Mendonça França rafaelfranca Merge pull request #6377 from ihid/depreciate_old_text_helper_apis
Deprecate old APIs for highlight, excerpt and word_wrap
2802ad0
Jon Leighton jonleighton Perf: Don't load the association for #delete_all.
Bug #6289

Conflicts:

	activerecord/test/cases/associations/has_many_associations_test.rb
b98d1e2
Jon Leighton jonleighton fix #delete_all with habtm with :delete_sql 855fabc
Ernie Miller ernie Fix HABTM syntax error in Ruby 1.8.x 3b444ee
Rafael Mendonça França rafaelfranca Merge pull request #6390 from ernie/invalid-ruby18-syntax-in-habtm
Invalid ruby18 syntax in habtm
8ad8f61
José Valim josevalim Merge pull request #5020 from KL-7/fix-blank-image_tag-source
Render img tag with empty src if empty string is passed to image_tag.
4dd4621
May 19, 2012
Piotr Sarnacki drogus Ensure that CollectionAssociation#replace returns proper target
The fix commited in e2a070c was returning the `new_target`, as
a try to return whatever user replaced association with. The
problem is, the resulting association target may be ordered
differently. In such case we want to return the target that
will be later used for that association.
d641646
Aaron Patterson tenderlove Merge pull request #6398 from pmahoney/threadsafe-connection-pool
Synchronize read and modification of @reserved_connections
879611f
Carlos Antonio da Silva carlosantoniodasilva Use right option for excerpt text helper in tests, fix build
`excerpt` text helper uses `:radius`, not `line_width` (that is used by
`word_wrap` helper).

Also cleanup some whitespaces.
c520504
Piotr Sarnacki drogus Fix `validates_uniqueness_off :field, :allow_nil => false`
Closes (#5853)

Uniqueness validator was not properly checking if there are any existing
records, when value was `nil` and column was text type. `nil` was
converted to string, which resulted in queries looking like:

```sql
SELECT 1 FROM "posts" WHERE "posts"."title" = '' LIMIT 1
```

instead of

```sql
SELECT 1 FROM "posts" WHERE "posts"."title" IS NULL LIMIT 1
```
f7d01ec
Piotr Sarnacki drogus Fix uniqueness validator with `allow_nil: false` also for mysql
MySQL's adapter was changing value for case sensitive comparison. We
don't need to do it for `nil`.
0d73d6e
May 20, 2012
Piotr Sarnacki drogus Improve docs for `try` by adding note on `BasicObject`
[ci skip] closes #5790
6ef9fda
pinetops pinetops Prevent concurrent compilation of templates - closes #6400 565c1b0
Gavin Morrice Bodacious Fixed tag_helper data-attribute bug with BigDecimals 39b9c94
José Valim josevalim Merge pull request #6407 from pinetops/565c1b0a0772ac6cf91c77e9285806…
…f7b028614c

Template concurrency fixes
fe9731e
Rafael Mendonça França rafaelfranca Merge pull request #6410 from Bodacious/tag_helper_data_fix_3-2-stable
TagHelper creates invalid data attributes when value is a BigDecimal
68a454c
Piotr Sarnacki drogus Fix generators to help with ambiguous `ApplicationController` issue
In development mode, dependencies are loaded dynamically at runtime,
using `const_missing`. Because of that, when one of the constants is
already loaded and `const_missing` is not triggered, user can end up
with unexpected results.

Given such file in an Engine:

```ruby
module Blog
  class PostsController < ApplicationController
  end
end
```

If you load it first, before loading any application files, it will
correctly load `Blog::ApplicationController`, because second line will
hit `const_missing`. However if you load `ApplicationController` first,
the constant will be loaded already, `const_missing` hook will not be
fired and in result `PostsController` will inherit from
`ApplicationController` instead of `Blog::ApplicationController`.

Since it can't be fixed in `AS::Dependencies`, the easiest fix is to
just explicitly load application controller.

closes #6413
b0f8355
May 21, 2012
Piotr Sarnacki drogus More info on commit messages in contributing guide
Add more info on how to write a good commit messages along with
example showing nicely formatted commit message.

Rails git history does not look too well when you try to figure out why
particular changes were introduced. We can do much better than that and
it's never too late to start.
64e12ff
Victor Costan pwnall Postgresql doesn't accept limits on binary (bytea) columns. 36fdb72
Sergey Nartimov lest Assets: don't add extension if other given and file exists
We should lookup if asset without appended extension exists.
When sprockets are disabled the asset tag helpers incorporate
this logic. When sprockets are enabled we should have the same
logic.

For example, we have style.ext file in app/assets/stylesheets and
we use stylesheet_link_tag in the layout. In this case we should
have /assets/style.ext instead of /assets/style.ext.css in the
output.

Closes #6310
39f9f02
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #6423 from lest/patch-2
assets: don't add extension if other given and file exists
f051071
Aaron Patterson tenderlove Merge pull request #6418 from pwnall/pgsql_bytea_limit3
Postgresql doesn't accept limits on binary (bytea) columns (for 3-2-stable)
5d6cca1
May 22, 2012
Piotr Sarnacki drogus Use require_dependency in generated controllers
Using require in development mode will prevent required files from
reloading, even if they're changed. In order to keep namespaced
application_controller reloadable, we need to use require_dependency
instead of require.
56b86a3
Godfrey Chan chancancode Restore the frozen state on rollback. Fixes #6417.
This is a 3-2-stable backport for #6420 which was merged into master.

Currently, when saving a frozen record, an exception would be thrown
which causes a rollback. However, there is a bug in active record that
"defrost" the record as a side effect:

    >> t = Topic.new
    => #<Topic id: nil, ...>
    >> t.freeze
    => #<Topic id: nil, ...>
    >> t.save
    RuntimeError: can't modify a frozen Hash
    >> t.frozen?
    => false
    >> t.save
    => true

This patch fixes the bug by explictly restoring the frozen state on the
attributes Hash after every rollback.
a543002
Rafael Mendonça França rafaelfranca Merge pull request #6445 from chancancode/3-2-stable_restore_frozen_s…
…tate_on_rollback

Restore the frozen state on rollback. (Backports #6420)
9ee8528
Godfrey Chan chancancode Fixes the build break caused by 9ee8528 in #6445.
Ruby 1.8 raises a TypeError when trying to modify a frozen Hash, while
Ruby 1.9 raises a RuntimeError instead. Also, Ruby < 1.9.3 uses a
lowercase 'hash' in the exception message while Ruby >= 1.9.3 uses an
uppercase 'Hash' instead. This commit normalizes those issues in the
test case.
d3715f6
Rafael Mendonça França rafaelfranca Merge pull request #6451 from chancancode/3-2-stable_restore_frozen_s…
…tate_on_rollback

Fixes the build break caused by 9ee8528 in #6445.
ff3cddf
Juan M. Cuello Juanmcuello Use Shellwords to scape arguments in db:structure:dump for PostgreSQL.
fixes #5913
587de84
May 23, 2012
Andrew Selder Synchronize the ConnectionPool#release method to avoid thread safety …
…issues [#6464]

Fixes #6464

Synchronize the contents of the release method in ConnectionPool due to
errors when running in high concurrency environments.

    Detected invalid hash contents due to unsynchronized modifications
with concurrent users
    org/jruby/RubyHash.java:1356:in `keys'
/usr/local/rvm/gems/jruby-1.6.7@new_import/gems/activerecord-3.2.3/lib/a
ctive_record/connection_adapters/abstract/connection_pool.rb:294:in
`release'

/usr/local/rvm/gems/jruby-1.6.7@new_import/gems/activerecord-3.2.3/lib/a
ctive_record/connection_adapters/abstract/connection_pool.rb:282:in
`checkin'
e663aa3
Aaron Patterson tenderlove Merge pull request #6467 from aselder/3-2-stable
Synchronize the body of the ConnectionPool#release method to improve thread safety.
356f2a6
May 24, 2012
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #5925 from Juanmcuello/pg_structure_dump
Quote arguments in db:structure:dump for PostgreSQL.
a9af9f1
May 25, 2012
Rafael Mendonça França rafaelfranca Merge pull request #5244 from fotos/myqsl2_wait_timeout
Maximum wait_timeout on Windows is 2147483
c90f3de
May 26, 2012
Brian Durand bdurand remove unnecessary memcache equire in ActionDispatch::Session::CacheS…
…tore
ba6d935
May 27, 2012
José Valim josevalim Merge pull request #6494 from pwim/no-memcache-require
memcache require not needed for cache store
81ad94e
Piotr Sarnacki drogus Fix railties_order when application object is passed
railites_order method, introduced in 40b19e0, had a bug that was causing
loading application instance twice in initializers if railties_order
already included application instance. So for example

    railties_order = [Foo::Engine, :main_app, Bar::Engine]

would result in such railties array:

    [MyApp::Application, Foo::Engine, MyAppApplication, Bar::Engine]

In order to fix it, we need to check for existence of application in
both railties_order and railties arrays.
0e69705
May 28, 2012
Bartłomiej Kozal bkzl Display annotations from .coffee files in `rake notes` 4ababde
Aaron Patterson tenderlove bumping to 3.2.4.rc1 fe4dfdd
May 29, 2012
James Mead floehopper Exceptions like Interrupt should not be rescued in tests.
This is a back-port of rails/rails#6525. See the commit notes there for
details.
0813b45
Rafael Mendonça França rafaelfranca Merge pull request #6531 from freerange/3-2-stable-minitest-passthrou…
…gh-exceptions

Exceptions like Interrupt should not be rescued in tests.
12e5c72
Oscar Del Ben oscardelben Remove irrelevant assertion 2f71d40
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #6519 from oscardelben/3-2-stable
Display annotations in coffee files
f09ae85
May 30, 2012
Erich Menge True, False, and Nil should be represented in as_json as themselves.
Conflicts:

	activesupport/lib/active_support/json/encoding.rb
	activesupport/test/json/encoding_test.rb
624f801
Aaron Patterson tenderlove Merge pull request #5810 from kennyj/fix_5797
Fix #5797. Error calling dup method on AR model with serialized field
Conflicts:
	activerecord/lib/active_record/core.rb
c470001
Erich Menge Deprecate ActiveSupport::JSON::Variable bcfa013
Piotr Sarnacki drogus Merge pull request #6553 from erichmenge/3-2-stable-json-patch
3 2 stable json patch
9f1b689
Rafael Mendonça França rafaelfranca Merge pull request #6477 from steveklabnik/close_discovered_pg_connec…
…tion

Properly discover a connection is closed in postgresql_adapter
b6727a1
Aaron Patterson tenderlove predicate builder should not recurse for determining where columns.
Thanks to Ben Murphy for reporting this

CVE-2012-2661
71f7917
Aaron Patterson tenderlove Strip [nil] from parameters hash.
Thanks to Ben Murphy for reporting this!

CVE-2012-2660
dff6db1
Aaron Patterson tenderlove Merge pull request #6558 from parndt/fix_regression
Fix regression
4c8805d
Aaron Patterson tenderlove Merge pull request #6558 from parndt/fix_regression
Fix regression
ac465d5
Martin O'Connor Changed symbol platform to platforms for the commented out call to ge…
…m 'therubyracer'.

Dependency.rb expects the symbol to be named :platforms as opposed to platform. RubyMine's inspections indicate that the symbol should be named :platforms.
Updating tests.
9bbdceb
Rafael Mendonça França rafaelfranca Merge pull request #6562 from martinoconnor/generator-fix-stable
3-2-stable Changed symbol platform to platforms for the commented out call to gem 'therubyracer'.
f8f6ad6
May 31, 2012
Philip Arndt parndt Revert "Removes unneeded caching from ActiveRecord::Base.relation"
This reverts commit ebfa58a.

This change caused a regression in my application's tests:

* Failing build http://travis-ci.org/#!/resolve/refinerycms/builds/1461242

Broken tests pass after this change is reverted.
4ce7f98
Aaron Patterson tenderlove updating changelogs d3e5d1c
Aaron Patterson tenderlove Merge branch '3-2-stable-sec' into 3-2-rel
* 3-2-stable-sec:
  Strip [nil] from parameters hash. Thanks to Ben Murphy for reporting this!
  predicate builder should not recurse for determining where columns. Thanks to Ben Murphy for reporting this
7182748
Aaron Patterson tenderlove adding security notifications to CHANGELOGs 44aca7b
Aaron Patterson tenderlove bumping to 3.2.4 febd652
Aaron Patterson tenderlove Merge branch '3-2-stable-sec' into 3-2-stable
* 3-2-stable-sec:
  Strip [nil] from parameters hash. Thanks to Ben Murphy for reporting this!
  predicate builder should not recurse for determining where columns. Thanks to Ben Murphy for reporting this
  bumping to 3.2.4.rc1
d66fd08
Aaron Patterson tenderlove Merge branch '3-2-rel' into 3-2-stable
* 3-2-rel:
  bumping to 3.2.4
  adding security notifications to CHANGELOGs
  updating changelogs
  Merge pull request #6558 from parndt/fix_regression
4df9680
Aaron Patterson tenderlove bumping to 3.2.5 b57fa0b
Jun 01, 2012
Andrew White pixeltrix Restore behavior of Active Record 3.2.3 scopes
A series of commits relating to preloading and scopes caused a regression.
Cloning the relation calls initialize_copy which resets a number of instance
variables to nil. Without this the scope thinks that it is already loaded
when it is called again.

Reverts the following commits:
13f1401
8491740
dffbb52

Fixes #6575, #6576 & #6577
7056079
Akira Matsuda amatsuda remove unneeded blank line from !namespeced? controller generators 8984bc2
Rafael Mendonça França rafaelfranca Merge pull request #6587 from amatsuda/controller_generator_remove_bl…
…ank_line_32

Backporting #6586 patch to 3-2-stable
ecd1722
Piotr Sarnacki drogus Include routes.mounted_helpers into integration tests
In integration tests, you might want to use helpers from engines that
you mounted in your application. It's not hard to add it by yourself,
but it's unneeded boilerplate. mounted_helpers are now included by
default. That means that given engine mounted like:

    mount Foo::Engine => "/foo", :as => "foo"

you will be able to use paths from this engine in tests this way:

    foo.root_path #=> "/foo"

(closes #6573)
8d4f63a
Rafael Mendonça França rafaelfranca Add release date of 3.2.5 on the CHANGELOG b13d89e
Nathaniel Bibler nbibler Use to_model delegates for polymorphic route generation 537ede9
José Valim josevalim Merge pull request #6588 from nbibler/polymorphic_to_model
Correct the use of to_model in polymorphic routing
5b6b0df
Piotr Sarnacki drogus Allow to use mounted helpers in ActionView::TestCase
Similarly to 6525002, this allows to use routes helpers for mounted
helpers, but this time in ActionView::TestCase
f550d4d
Rafael Mendonça França rafaelfranca Merge pull request #6593 from yahonda/skip_test_remove_column_with_ar…
…ray_as_an_argument_is_deprecated

Skip test_remove_column_with_array_as_an_argument_is_deprecated with Oracle
43f0af4
Jun 02, 2012
Yasuo Honda yahonda Skip test_remove_column_with_array_as_an_argument_is_deprecated with …
…Oracle adapter.

Because Oracle adapter supports only remove_column :table_name, :column_name syntax
and it has never supported remove_column :table_name, [:column_name].
7544c7a
Jun 04, 2012
Evan Arnold earnold Add failing test for 3.2.5 datetime attribute regression bebbdb5
Toshinori Kajihara kennyj Fix #6591. If a field with timezone isn't changed, we don't call will…
…_change!.
510ef2b
Rafael Mendonça França rafaelfranca Merge pull request #6622 from kennyj/fix_6591-32
[3-2-stable back ported] Fix #6591 Rails 3.2.5 Regression: incorrect _changed? for datetimes
9f52d15
Jun 05, 2012
Carlos Galdino carlosgaldino Deprecate `:confirm` in favor of `:data => { :confirm => 'Text' }` op…
…tion

This deprecation applies to:
`button_to`
`button_tag`
`image_submit_tag`
`link_to`
`submit_tag`

As :confirm is an UI specific option is better to use the data attributes,
teaching users about unobtrusive JavaScript and how Rails works with it.
fc092a9
Rafael Mendonça França rafaelfranca Merge pull request #6613 from carlosgaldino/3-2-data-confirm
Deprecate `:confirm` in favor of `:data => { :confirm => 'Text' }` option
6347554
Rafael Mendonça França rafaelfranca Add test to flash sweep after two redirects
This test is needed to avoid regressions in the way that flash works
now (swept in every request).
f7cde3e
Rafael Mendonça França rafaelfranca Revert "fix the Flash middleware loading the session on every request…
… (very dangerous especially with Rack::Cache), it should only be loaded when the flash method is called"

This reverts commits e3069c6 and 2b2983d.

Reason: This add a non-backward compatible change in the way that flash
works now (swept in every request).
3cba6ee
Jun 06, 2012
Tsutomu Kuroda kuroda Fix human attribute_name to handle deeply nested attributes
This is a back-port of b0e2fc8 to Rails 3.2.
See #5843 and #3859 also.
029936e
José Valim josevalim Merge pull request #6642 from kuroda/3-2-activemodel-translation-patch
Fix human attribute_name to handle deeply nested attributes
6b6c1de
Jun 07, 2012
Jon Leighton jonleighton Revert "Perf: Don't load the association for #delete_all."
This reverts commit b98d1e2.

Closes #6609

Conflicts:

	activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
959fb8e
Jon Leighton jonleighton Make test cover previous reversion 68d3e1f
Piotr Sarnacki drogus Fix asset tags for files with more than one dot
After the fix done in 39f9f02, there are cases that will not work
correctly. If you have file with "2 extensions", like foo.min.js and you
reference the file without extension, like:

    javascript_include_tag "foo.min"

it will fail because sprockets finds foo.min.js with foo.min argument.

This commit fixes this case and will get the right file even when
referrencing it without extension.

(closes #6598)
5b0a891
Jun 08, 2012
Piotr Sarnacki drogus Fix railties test suite
Apparently asset_environment should not be invoked if it's not needed.
This fixes broken build by getting back to the code more similar to the
version changed here: 5b0a891
fa352c4
Arun Agrawal arunagw Removed protected as we already doing it above. 7ad5f8b
Arun Agrawal arunagw We should not include engine.rake file into rake
if we are passing -T which is skip_test_unit

See issue #6673 for more details.

I saw that we are not creating dummy app even if 
we do skip_test_unit. 

Fixes #6673
8b1d475
Rafael Mendonça França rafaelfranca Merge pull request #6677 from arunagw/3-2-stable
Removed protected as we already doing it above.
dfb1ebe
Rafael Mendonça França rafaelfranca Merge pull request #6678 from arunagw/fix_issue_6673
Fix issue 6673
0e4d16f
Piotr Sarnacki drogus Don't add sqlite3 to gemspec with -O on rails plugin new
(closes #6672)
8475cdd
Jun 09, 2012
Tieg Zaharia tiegz ActiveRecord#attributes optimization: minimize objects created 6e4a064
Niranjan achamian buffered logger is initialized with the log level passed trough the i…
…nitializer
01f8f29
Arun Agrawal arunagw Duplicate tests removed. f36fd0e
Andrew White pixeltrix Merge pull request #6689 from arunagw/duplicate_test_removed
Duplicate test removed
6900a4e
José Valim josevalim Merge pull request #6687 from tiegz/3-2-optimizations
ActiveRecord#attributes optimization: minimize objects created
eaeebc2
Jun 10, 2012
Jens Krämer jkraemer fix namespace collision with test-unit-activesupport e66c240
José Valim josevalim Merge pull request #6693 from jkraemer/3-2-stable
Bugfix: Namespace collision with test-unit-activesupport 1.0.0
6cc941d
Rafael Mendonça França rafaelfranca Merge pull request #6695 from kennyj/fix_6635
Fix #6635. We should call Scoping methods, before calling Array methods.
5dfb01e
Rafael Mendonça França rafaelfranca Merge pull request #6688 from c42engineering/buffered_logger_level_wh…
…ile_creation

BufferedLogger level while creation
35c89a4
iaddict iaddict Minimal change to query generation of exists? that makes SQLServer an…
…d others happy that do not work without a column alias.

Conflicts:
	activerecord/lib/active_record/relation/finder_methods.rb
dd286a4
Rafael Mendonça França rafaelfranca Add test to column alias in `exists?` SQL.
This behavior was added in dd286a4

Closes #1139.

Fixes #2553, #1141, #1623 and #2062.
179276e
Rafael Mendonça França rafaelfranca Remove warning 9e6eb8b
Rafael Mendonça França rafaelfranca Merge pull request #6521 from Empact/throw-result
Fix that #exists? can blow up with ThrowResult exception
Conflicts:
	activerecord/lib/active_record/relation/finder_methods.rb
bbec883
Jun 11, 2012
Rafael Mendonça França rafaelfranca Merge pull request #6698 from yahonda/address_ora_911_master
Address ORA-00911 errors because of the heading underscore.
c9f27e3
Rafael Mendonça França rafaelfranca Merge pull request #6690 from suginoy/fix-templates-copy
Fix: 'rake rails:templates:copy' doesn't work
Conflicts:
	railties/test/application/rake_test.rb
0391ae9
Toshinori Kajihara kennyj Fix GH #3163. Should quote database on mysql/mysql2.
Conflicts:

	activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
22994b2
Toshinori Kajihara kennyj Change the string to use in test case.
Conflicts:

	activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
	activerecord/test/cases/adapters/mysql2/schema_test.rb
0ccdeeb
Ernie Miller ernie Additional fix for CVE-2012-2661
While the patched PredicateBuilder in 3.1.5 prevents a user
from specifying a table name using the `table.column` format,
it doesn't protect against the nesting of hashes changing the
table context in the next call to build_from_hash. This fix
covers this case as well.
cc2903d
Aaron Patterson tenderlove Array parameters should not contain nil values. 38edea0
Aaron Patterson tenderlove updating changelogs 301974a
Aaron Patterson tenderlove updating changelogs with security fixes ceb8ec3
Aaron Patterson tenderlove bumping version numbers ee4209a
Jun 12, 2012
Angelo Capilleri acapilleri Fix the the backport of the object dup with the ruby 1.9.3p194.
At the end of initialize_dup was added the call to super if it exists,
so it also works with 1.8.7 where initialize_dup doesn't exist.
This issu was introduced with the pull request #6324
b97e0a1
Rafael Mendonça França rafaelfranca Merge pull request #6682 from acapilleri/dup_validation_fix_backport_…
…for_1_9_3

Dup validation fix backport for 1 9 3
6522a12
Rafael Mendonça França rafaelfranca Merge pull request #6676 from aurelian/master
Don't assign the attributes if the list is empty
32709ea
Rafael Mendonça França rafaelfranca Merge pull request #6715 from arunagw/add_asserts
Need a assert here in tests
5dd2cfc
Aaron Patterson tenderlove updating changelogs 8381d39
Aaron Patterson tenderlove Merge branch '3-2-stable-rel' into 3-2-stable
* 3-2-stable-rel:
  updating changelogs
  bumping version numbers
  updating changelogs with security fixes
  updating changelogs
  Array parameters should not contain nil values.
  Additional fix for CVE-2012-2661
10cdbbc
Francesco Rodríguez frodsan Fix build eed1cfe
Rafael Mendonça França rafaelfranca Merge pull request #6716 from frodsan/patch-2
Fix Build
966371a
Jun 13, 2012
Santiago Pastorino spastorino ActionController::Caching depends on RackDelegation and AbstractContr…
…oller::Callbacks
7f93791
Jun 14, 2012
Aaron Patterson tenderlove adding a test for #6459 e7d1849
Steve Klabnik steveklabnik Deprecate update_attribute.
Historically, update_attribute and update_attributes are similar, but
with one big difference: update_attribute does not run validations.
These two methods are really easy to confuse given their similar
names. Therefore, update_attribute is being deprecated in favor of
update_column, and will be removed in Rails 4.

See the discussion on rails-core here:
https://groups.google.com/d/topic/rubyonrails-core/BWPUTK7WvYA/discussion
b081f6b
Xavier Noria fxn Merge pull request #6739 from steveklabnik/3-2-stable
Deprecate update_attribute
63bcfbb
Xavier Noria fxn registers the deprecation of update_attribute in the CHANGELOG 2109fd5
Rafael Mendonça França rafaelfranca Remove unneded tests.
Before b081f6b, this test are
asserting that update_attribute does the dirty tracking. Since we
deprecated this method and update_column write in the database directly
this tests will always fail.
a8e22ae
Jun 16, 2012
Dmitry Vorotilin route ActionController::Metal doesn't have logger method, check it and then…
… delegate
3b1ea3d
Dmitry Vorotilin route Added test for case when view doesn't have logger method when using A…
…ctionController::Metal controller.
4717c2f
Rafael Mendonça França rafaelfranca Merge pull request #6752 from steveklabnik/fix_5680
Respect absolute paths in compute_source_path.
52d0963
Arun Agrawal arunagw It should also include text/css => Build Fix 909a4a5
Rafael Mendonça França rafaelfranca Merge pull request #6756 from arunagw/build_fix_ap
Build fix actionpack
ed93c86
Jun 17, 2012
Francesco Rodríguez frodsan bump AS deprecation_horizon to 4.0 a556c7e
Rafael Mendonça França rafaelfranca Merge pull request #6764 from frodsan/patch-4
bump AS deprecation_horizon to 4.0
284ebf2
Jun 18, 2012
José Valim josevalim Use strict_args_position! if available from Thor 83451be
Steve Klabnik steveklabnik Deprecating composed_of in ActiveRecord
This feature adds a lot of complication to ActiveRecord for dubious
value. Let's talk about what it does currently:

class Customer < ActiveRecord::Base
  composed_of :balance, :class_name => "Money", :mapping => %w(balance
amount)
end

Instead, you can do something like this:

    def balance
      @balance ||= Money.new(value, currency)
    end

    def balance=(balance)
      self[:value] = balance.value
      self[:currency] = balance.currency
      @balance = balance
    end

Since that's fairly easy code to write, and doesn't need anything
extra from the framework, if you use composed_of today, you'll
have to add accessors/mutators like that.

This feature will be removed in Rails 4.
44b313b
Rafael Mendonça França rafaelfranca Merge pull request #6742 from steveklabnik/deprecate_composed_of
Deprecate composed of
ffcecf2
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #6649 from route/logger_in_metal_3_2
Logger in metal backport for 3.2
2363aaf
José Valim josevalim Merge pull request #6758 from caironoleto/master
Fixing load config in some tasks
Conflicts:
	activerecord/lib/active_record/railties/databases.rake
94489a2
Jun 21, 2012
Rafael Mendonça França rafaelfranca Merge branch 'acapilleri-update_nested_attributes'
Closes #6675

Conflicts:
	activerecord/lib/active_record/attribute_methods/dirty.rb
40617c7
Rafael Mendonça França rafaelfranca Remove waning of unused variable 200e6a6
Jun 24, 2012
Rafael Mendonça França rafaelfranca Merge pull request #6842 from ernie/handle-non-strings-in-grouped-cal…
…culations

Stop assuming strings for grouped calculations
Conflicts:
	activerecord/lib/active_record/relation/calculations.rb
12ac977
Jun 25, 2012
Carlos Antonio da Silva carlosantoniodasilva Ensure Arel columns are typecasted properly when grouping with calcul…
…ation

Fix build issue with postgresql.

Conflicts:
	activerecord/lib/active_record/relation/calculations.rb
	activerecord/test/cases/calculations_test.rb
f8f4ac9
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #6857 from rsutphin/as_core_ext_time_missing_require
Missing require breaks Time.=== when selectively loading ActiveSupport core_exts in 3.2.4+
3fccf6a
Jun 28, 2012
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #6900 from cbandy/issue-6898
Require URI in ConnectionSpecification
Conflicts:
	activerecord/lib/active_record/connection_adapters/connection_specification.rb
10e5685
Rafael Mendonça França rafaelfranca Merge pull request #6878 from masarakki/master
fix bug in limit of enum columns of mysql

Closes #6432
48601c2
Jun 29, 2012
Xavier Noria fxn make sure the inflection rules are loaded when cherry-picking active_…
…support/core_ext/string/inflections.rb [fixes #6884]
9e0b3fc
Jul 02, 2012
Francesco Rodríguez frodsan Backport #3329 to 3-2-stable
Fix bug with autosave collection association on new record with a marked
for destroy record in autosave collection.

Fixes #6918.
b1e509a
Rafael Mendonça França rafaelfranca Merge pull request #6935 from frodsan/b1e509ad7a8c8264544f10f4666705c…
…d806b5408

Backport #3329 to 3-2-stable
dacc947
Mark J. Titorenko mjtko Fix NumberHelper options wrapping to prevent verbatim blocks being re…
…ndered instead of line continuations. While I'm at it, wrap long comment lines consistently.

Conflicts:
	actionpack/lib/action_view/helpers/number_helper.rb

There was just one conflict related to the addition of the :format
option to number_to_percentage.
7faa620
Jul 05, 2012
Dmitry Vorotilin route Show in log correct wrapped keys ffdca21
Rafael Mendonça França rafaelfranca Merge pull request #6973 from route/wrapped_keys_in_log_for_3_2
MIssed backport for 3.2
c7afc42
Jul 06, 2012
José Valim josevalim Since Rails 3.2, use layout false to render no layout 03dcdc3
Rafael Mendonça França rafaelfranca Merge pull request #6985 from sidonath/disable-query-cache-for-locks
Disable query cache for lock queries
Conflicts:
	activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
7adc4f2
Jul 09, 2012
Prem Sichanugrist sikachu Update coding convention from master 904eace
Xavier Noria fxn Merge pull request #7015 from sikachu/3-2-stable-code-style
Update coding convention from master
45d78a3
Jul 10, 2012
rustygeldmacher rustygeldmacher Fixed bug creating invalid HTML in select options
When a select tag is created for a field with errors, and that select
tag has :prompt or :include_blank options, then the inserted first
option will errantly have a <div class="field_with_errors"> wrapping
it.

See #7017
27c8deb
Rafael Mendonça França rafaelfranca Merge pull request #7025 from rustygeldmacher/select_options_valid_html
Select options valid html
3b1de4a
Robb Kidd robbkidd Update psql adapter to rename a default pkey sequence during rename_t…
…able.
8d3eafe
Jul 11, 2012
Piotr Sarnacki drogus Merge pull request #7031 from robbkidd/rename_sequences_too_backport_…
…to_3-2

Back-port #6874 to 3.2: psql adapter should rename a default pk sequence during rename_table
e72d876
Jul 13, 2012
Jeremy Cole jeremycole Only use prepared statements when bind variables are present
Prepared statements (prepare/execute/close) were being used unnecessarily
when no bind variables were present, and disabling prepared statement using
prepared_statements:false was principally broken. While bind variables were
correctly substituted with prepared_statements:false, the prepared statement
interface was still used, costing an extra two round trips per query.

In addition to making this behavioral change, I also cleaned up the internals
of exec_stmt and exec_without_stmt so that they behave the same (calling log
and constructing the ActiveRecord::Result in the same way).

Moving the check for binds.empty? to exec_query also will mean that several
code paths explicitly calling exec_without_stmt could be cleaned up to once
again call exec_query instead. I have also left the check for binds.empty? in
exec_stmt, since it is not a private method and could be called directly with
an empty binds array. For the sake of clarity in this patch, I have not made
those changes.

= The previous behavior =

When issuing a Foo.find(1) with prepared_statements:true, the bind variable
is present in the prepared query, and execute shows a value passed:

    Connect	root@localhost on rails_test
    Query	SET SQL_AUTO_IS_NULL=0
    Statistics
    Query	SHOW FULL FIELDS FROM `foos`
    Query	SHOW TABLES LIKE 'foos'
    Query	SHOW CREATE TABLE `foos`
    Prepare	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = ? LIMIT 1
    Execute	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
    Close stmt
    Quit

When issuing a Foo.find(1) with prepared_statements:false, the bind variable
has already been removed and substituted with the value, but the prepared
statement interface is used anyway:

    Connect	root@localhost on rails_test
    Query	SET SQL_AUTO_IS_NULL=0
    Statistics
    Query	SHOW FULL FIELDS FROM `foos`
    Query	SHOW TABLES LIKE 'foos'
    Query	SHOW CREATE TABLE `foos`
    Prepare	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
    Execute	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
    Close stmt
    Quit

= With this patch applied =

When issuing a Foo.find(1) with prepared_statements:true, the bind variable
is present in the prepared query, and execute shows a value passed:

    Connect	root@localhost on rails_test
    Query	SET SQL_AUTO_IS_NULL=0
    Statistics
    Query	SHOW FULL FIELDS FROM `foos`
    Query	SHOW TABLES LIKE 'foos'
    Query	SHOW CREATE TABLE `foos`
    Prepare	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = ? LIMIT 1
    Execute	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
    Close stmt
    Quit

When issuing a Foo.find(1) with prepared_statements:false, the bind variable
has been removed and substituted with the value, and the query interface is
used instead of the prepared statement interface:

    Connect	root@localhost on rails_test
    Query	SET SQL_AUTO_IS_NULL=0
    Statistics
    Query	SHOW FULL FIELDS FROM `foos`
    Query	SHOW TABLES LIKE 'foos'
    Query	SHOW CREATE TABLE `foos`
    Query	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
    Quit
e4ef90a
Jeremy Cole jeremycole Fixing texts; down to three failing tests. 8f43230
Aaron Patterson tenderlove fixing tests to deal with data differences between prepared statement…
…s and non-prepared statements
f7ef7ca
Jul 15, 2012
Xavier Noria fxn adds a missing require [fixes #6896]
This file uses Time.zone, which is defined in
active_support/core_ext/time/zones.rb.
b3693bf
Jul 17, 2012
Rafael Mendonça França rafaelfranca Merge pull request #4396 from kennyj/fix_4259
Fix GH #4259. When we execute schema dumper, we must remove table_name_prefix and table_name_suffix.
e23ec4c
Andrew White pixeltrix Add support for optional root segments containing slashes
Optional segments with a root scope need to have the leading slash
outside of the parentheses, otherwise the generated url will be empty.
However if the route has non-optional elements then the leading slash
needs to remain inside the parentheses otherwise the generated url
will have two leading slashes, e.g:

Blog::Application.routes.draw do
  get '/(:category)', :to => 'posts#index', :as => :root
  get '/(:category)/author/:name', :to => 'posts#author', :as => :author
end

$ rake routes
  root GET /(:category)(.:format)              posts#index
author GET (/:category)/author/:name(.:format) posts#author

This change adds support for optional segments that contain a slash,
allowing support for urls like /page/2 for the root path, e.g:

Blog::Application.routes.draw do
  get '/(page/:page)', :to => 'posts#index', :as => :root
end

$ rake routes
root GET /(page/:page)(.:format) posts#index

Fixes #7073
(cherry picked from commit d8745de)
71d274d
John Firebaugh jfirebaugh AR::Integration must be included after AM::Conversion
Integration's definition of #to_param must override
Conversion's. Otherwise, there is a regression from
3.1 in the behavior of a non-persisted AR::Base instance
which nevertheless has an id.
9b5309f
Jon Leighton jonleighton Merge pull request #7080 from jfirebaugh/to_param_regression
AR::Integration must be included after AM::Conversion
827f369
Jul 19, 2012
Arun Agrawal arunagw Bumping mocha!
Reason:- 0.12.0 introduced a bug where you got a exception
which is now in 0.12.1 is a warning only!
89dee0e
Rafael Mendonça França rafaelfranca Merge pull request #7108 from arunagw/mocha_bump
Bumping mocha!
22880de
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #6616 from dpassage/fix_resolver_test_sqlite3
Resolver tests fail if mysql adapter not installed
b16e7ed
Jul 20, 2012
Jon Leighton jonleighton Deprecate :finder_sql, :counter_sql, :insert_sql, :delete_sql. a79bfa9
Rafael Mendonça França rafaelfranca `validates_inclusion_of` and `validates_exclusion_of` now accept
`:within` option as alias of `:in` as documented.

Fix #7118
089371a
Jul 21, 2012
Xavier Noria fxn Hash#fetch(fetch) is not the same as doing hash[key] a37b90c
Jul 23, 2012
Andrew White pixeltrix Bump Journey requirements to 1.0.4
There are some Action Pack tests for regressions from 3.1 that require
a later version of Journey to pass so bump to the current version.
6b7d26c
Aaron Patterson tenderlove updating changelogs 125dfdf
Aaron Patterson tenderlove updating the version 753c546