Skip to content
This repository

Fix behavior of `rake db:structure:load` for 3.2.8 #7985

Closed
wants to merge 1,098 commits into from
Martin Grandrath

This patch fixes issue rails/rails#7951 for 3.2.8. I created a blank app and can confirm that this change restores the desired behavior to rake db:structure:load.

and others added some commits
Aaron Patterson adding a test for #6459 e7d1849
Steve Klabnik 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 Merge pull request #6739 from steveklabnik/3-2-stable
Deprecate update_attribute
63bcfbb
Xavier Noria registers the deprecation of update_attribute in the CHANGELOG 2109fd5
Rafael Mendonça França 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
Dmitry Vorotilin ActionController::Metal doesn't have logger method, check it and then…
… delegate
3b1ea3d
Dmitry Vorotilin Added test for case when view doesn't have logger method when using A…
…ctionController::Metal controller.
4717c2f
Rafael Mendonça França Merge pull request #6752 from steveklabnik/fix_5680
Respect absolute paths in compute_source_path.
52d0963
Arun Agrawal It should also include text/css => Build Fix 909a4a5
Rafael Mendonça França Merge pull request #6756 from arunagw/build_fix_ap
Build fix actionpack
ed93c86
Francesco Rodríguez bump AS deprecation_horizon to 4.0 a556c7e
Rafael Mendonça França Merge pull request #6764 from frodsan/patch-4
bump AS deprecation_horizon to 4.0
284ebf2
José Valim Use strict_args_position! if available from Thor 83451be
Steve Klabnik 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 Merge pull request #6742 from steveklabnik/deprecate_composed_of
Deprecate composed of
ffcecf2
Carlos Antonio da Silva Merge pull request #6649 from route/logger_in_metal_3_2
Logger in metal backport for 3.2
2363aaf
José Valim Merge pull request #6758 from caironoleto/master
Fixing load config in some tasks
Conflicts:
	activerecord/lib/active_record/railties/databases.rake
94489a2
Rafael Mendonça França Merge branch 'acapilleri-update_nested_attributes'
Closes #6675

Conflicts:
	activerecord/lib/active_record/attribute_methods/dirty.rb
40617c7
Rafael Mendonça França Remove waning of unused variable 200e6a6
Rafael Mendonça França 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
Carlos Antonio da Silva 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 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
Carlos Antonio da Silva 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 Merge pull request #6878 from masarakki/master
fix bug in limit of enum columns of mysql

Closes #6432
48601c2
Xavier Noria make sure the inflection rules are loaded when cherry-picking active_…
…support/core_ext/string/inflections.rb [fixes #6884]
9e0b3fc
Francesco Rodríguez 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 Merge pull request #6935 from frodsan/b1e509ad7a8c8264544f10f4666705c…
…d806b5408

Backport #3329 to 3-2-stable
dacc947
Mark J. Titorenko 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
Dmitry Vorotilin Show in log correct wrapped keys ffdca21
Rafael Mendonça França Merge pull request #6973 from route/wrapped_keys_in_log_for_3_2
MIssed backport for 3.2
c7afc42
José Valim Since Rails 3.2, use layout false to render no layout 03dcdc3
Rafael Mendonça França 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
Prem Sichanugrist Update coding convention from master 904eace
Xavier Noria Merge pull request #7015 from sikachu/3-2-stable-code-style
Update coding convention from master
45d78a3
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 rails#7017
27c8deb
Rafael Mendonça França Merge pull request #7025 from rustygeldmacher/select_options_valid_html
Select options valid html
3b1de4a
Robb Kidd Update psql adapter to rename a default pkey sequence during rename_t…
…able.
8d3eafe
Piotr Sarnacki 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
Jeremy Cole 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 Fixing texts; down to three failing tests. 8f43230
Aaron Patterson fixing tests to deal with data differences between prepared statement…
…s and non-prepared statements
f7ef7ca
Xavier Noria adds a missing require [fixes #6896]
This file uses Time.zone, which is defined in
active_support/core_ext/time/zones.rb.
b3693bf
Justin Mazzi Update documentation for Rails::Application#env_config c6ad167
Rafael Mendonça França 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 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 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 Merge pull request #7080 from jfirebaugh/to_param_regression
AR::Integration must be included after AM::Conversion
827f369
Arun Agrawal 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 Merge pull request #7108 from arunagw/mocha_bump
Bumping mocha!
22880de
Carlos Antonio da Silva Merge pull request #6616 from dpassage/fix_resolver_test_sqlite3
Resolver tests fail if mysql adapter not installed
b16e7ed
Jon Leighton Deprecate :finder_sql, :counter_sql, :insert_sql, :delete_sql. a79bfa9
Rafael Mendonça França `validates_inclusion_of` and `validates_exclusion_of` now accept
`:within` option as alias of `:in` as documented.

Fix #7118
089371a
Xavier Noria Hash#fetch(fetch) is not the same as doing hash[key] a37b90c
Andrew White 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 updating changelogs 125dfdf
Aaron Patterson updating the version 753c546
Alex Tambellini

There is an issue with the new version of journey that will probably affect a lot of people:

rails/journey#42

Pedro Nascimento
lunks commented on 904eace

Is there any discussion about indenting after private/protected? At the same time I want to stay in convention with Rails', I'd like to see the arguments favoring indent. I honestly prefer to not indent methods after private/protected.

Owner
fxn replied

@lunks there is really no discussion going on. Of course this only applies to the Rails code base, Rails applications can have other conventions.

Conventions are arbitrary up to some point. There are people who prefer not to use parens for method definitions, there are people who prefer to surround arguments in a method call with spaces, there are people who put private/protected against the left margin so that they stand out... Though we all have our preferences, at the end of the day it does not matter much, those are the conventions agreed in the project and we stick to them to have a uniform code base.

I understand, but what motivated the change into the private/protected indenting? Please do not think of this as rant, I'm rather curious about what made you guys change your mind about this.
I prefer the older convention, and as far as discussions went on my side so far, there were no compelling arguments to either way. As such, changing this probably was led by someone stating "hey, this is better because of x." and the change was made by @sikachu afterwards.

Owner
fxn replied

Ah, sure.

That was the convention of the project before (https://rails.lighthouseapp.com/projects/8994/source-style) and got somehow changed. Don't remember the details. I believe David himself feels strong about indenting after private/protected in particular.

Owner

@lunks it was not a decision reached by consensus among rails core. some of us do not like the intented style, but ultimately it's not something that there's much point arguing about as we have much more important things to do :)

THIS IS NOT WHAT I WANT! I WANT MY CODING STYLE BACK!

Indeed, @jonleighton, not much to talk about other than pick one and live with it.

Thanks for the input. :)

and others added some commits
Sebastian Martinez New #update_columns method. f27a8eb
Philip Arndt Suggest using update_columns instead of update_column.
update_column is deprecated in Rails 4.0 so it makes no sense to
recommend adopting it only to require changing to update_columns
in the very next release.
a0b85b9
Aaron Patterson Merge pull request #7159 from parndt/update_columns
Backport update_columns to Rails 3.2
def9c85
Carlos Antonio da Silva Fix AR#update_columns tests on Ruby 1.8.7 17a64de
Philip Arndt

Good catch :+1: I've been using Ruby 1.9 hashes so much lately I didn't even notice!

and others added some commits
Alan Da Costa

It'd be nice if the collection to be operated on had its logic outside of the operations, so we don't have to follow logic like this "next" method. It seems like there are lots of different things going on here in general, also record skipping and setting a "saved" variable and then potentially acting on that variable state.

edit: this method is too large. Is it too late to refactor?

Collaborator

never is too late, send a pull request :)

and others added some commits
Aaron Patterson * Do not convert digest auth strings to symbols. CVE-2012-3424 27311fe
Aaron Patterson updating the changelog fb89f6f
Aaron Patterson bumping to 3.2.7 21bcac1
Aaron Patterson updating release date d1b9cf2
Aaron Patterson Merge branch '3-2-rel' into 3-2-stable
* 3-2-rel:
  updating release date
  bumping to 3.2.7
  updating the changelog
  * Do not convert digest auth strings to symbols. CVE-2012-3424
  updating the version
  updating changelogs
133754e
Rafael Mendonça França Only require the `:rails_env` task where is needed.
`:rails_env` tasks is not needed in all the tasks that depends of
`load_config`, only in the tasks that uses `Rails.env`.

Since `:rails_env` task set the `Rails.env` to be "development" if it is
not set we don't need the `||` statements too

Fix #7175.
4b8b8c1
Xavier Noria adds a missing require from Active Support
This file uses mattr_accessor.
db340da
Xavier Noria missing require: the AR session store depends on the AP abstract store
This require makes the dependency even more clear.
In particular we are eager loading the session
store but that does not work if AR is used
outside Rails, this patch is preliminary work
in fixing #7160.
bf16456
Francesco Rodríguez Backport #6995 to 3-2 stable
Update `test_help` to config properly turn natural language option.
Last versions of Turn don't monkey patch MiniTest to setup
the natural language option. Here is an [example](https://github.com/TwP/turn/blob/master/try/test_autorun_minitest.rb#L3).

This patches the following behaviour:

    $ rake test:units
    `<top (required)>': undefined method `use_natural_language_case_names='
    for MiniTest::Unit:Class (NoMethodError)
3326b8b
Rafael Mendonça França Merge pull request #7187 from frodsan/fix_test_help
Backport #6995 to 3-2 stable
be408d6
Xavier Noria removes the AR session store from eager loaded code [fixes #7160]
See the comment in the file activerecord/lib/active_record.rb
added by this patch for the rationale.
cc712f2
Rafael Mendonça França Revert "Add update_columns and the suggestion of using update_columns
instead of update_column"

This reverts commit 9fa06c3.

This reverts commit 17a64de.

This reverts commit def9c85, reversing
changes made to 6b7d26c.

Reason: This was supposed to be released with 3.2.7 before the
suggestion to use update_column. Since it was not release now is not
good to suggest to use another method because it will confusing the
people.
2f930df
Rafael Mendonça França Add CHANGELOG entry [ci skip] a893672
Rafael Mendonça França Merge pull request #7147 from pferdefleisch/scaffold_controller_docs
Updated scaffold_controller generator docs #7146
69fd0e8
Rafael Mendonça França Merge pull request #7070 from jmazzi/3-2-stable
Update documentation for Rails::Application#env_config
3e01a2a
Santiago Pastorino Add missing CHANGELOG entries
[ci skip]
6764b7b
Rafael Mendonça França Revert "Deprecating composed_of in ActiveRecord"
This reverts commit 44b313b.
736bf14
Jon Leighton Revert "Deprecate :finder_sql, :counter_sql, :insert_sql, :delete_sql."
This reverts commit a79bfa9.

Conflicts:
	activerecord/CHANGELOG.md

We shouldn't introducing deprecations in point releases.
It will be deprecated in 4.0 instead.
0c52702
Rafael Mendonça França Revert "Deprecate `:confirm` in favor of `:data => { :confirm => 'Tex…
…t' }` option"

Revert "Deprecate `:disable_with` in favor of `'data-disable-with'` option for `button_to` and `submit_tag` helpers."

This reverts commit fc092a9.
This reverts commit e9051e2.
This reverts commit d47d6e7.
This reverts commit 21141e7.
89177ba
Xavier Noria revises the deprecation warning of update_attribute
We have decided not to drop this important method in 4.0 and give
it a longer deprecation cycle. On the other hand we do not expect
to have update_column around for a long time, it is going to be
replaced in favor of update_columns.
f203be9
Xavier Noria removes the deprecation of update_attribute
Applying the new policy here to not deprecate stuff in point releases.
81542f9
Rafael Mendonça França Fix CHANGELOGS 857697b
Rafael Mendonça França Revert "Deprecate ActiveSupport::JSON::Variable"
This reverts commit bcfa013.
af65b8c
Rafael Mendonça França Revert "Deprecate `:mouseover` options for `image_tag` helper."
This reverts commit 1aff772.

Conflicts:
	actionpack/CHANGELOG.md
e826a5c
Rafael Mendonça França Revert "Deprecate link_to_function and button_to_function helpers"
This reverts commit 9dc57fe.
f50a5d2
Santiago Pastorino Bump to 3.2.8.rc1 fcccbac
Santiago Pastorino This entry is wrong 74cf196
and others added some commits
Mike Gunderloy Fix ActiveSupport integration with Mocha > 0.12.1
Mocha 0.12.2 renames the Integration module to
MonkeyPatching. This breaks the code Rails uses
to retrieve the assertion counter from Mocha.
a252436
Carlos Antonio da Silva Merge pull request #7235 from ffmike/mocha_12_2_compat
Fix ActiveSupport integration with Mocha > 0.12.1
5365c10
Toshinori Kajihara Backport #5168 to 3-2-stable. Fix a problem that NULLS is ignored by …
…postgresql_adapter.rb while creating distincts.
f137c2b
Carlos Antonio da Silva Merge pull request #7232 from kennyj/fix_7200
Fix #7200. Backport #5168 to 3-2-stable
59c4b22
Rafael Mendonça França Do not consider the numeric attribute as changed if the old value is
zero and the new value is not a string.

Before this commit this was the behavior

r = Review.find_by_issue(0)
r.issue
=> 0
r.changes
=> {}
r.issue = 0
=> 0
r.changed?
=> true
r.changes
=> {"issue"=>[0,0]}

Fixes #7237
99f622d
Rafael Mendonça França Use `:data => { :confirm => "Text" }` syntax instead of `:confirm` at
the ERB scaffold generator.

We are trying to teach the data attributes as best practices and
`:confirm` will be deprecated in 4.0.
96e92b6
Mike Gunderloy Fix ActiveSupport integration with Mocha > 0.12.1
Mocha 0.12.2 renames the Integration module to
MonkeyPatching. This breaks the code Rails uses
to retrieve the assertion counter from Mocha.
5c42889
Rafael Mendonça França Do not consider the numeric attribute as changed if the old value is
zero and the new value is not a string.

Before this commit this was the behavior

r = Review.find_by_issue(0)
r.issue
=> 0
r.changes
=> {}
r.issue = 0
=> 0
r.changed?
=> true
r.changes
=> {"issue"=>[0,0]}

Fixes #7237
55e05d4
Rafael Mendonça França Use `:data => { :confirm => "Text" }` syntax instead of `:confirm` at
the ERB scaffold generator.

We are trying to teach the data attributes as best practices and
`:confirm` will be deprecated in 4.0.
9c1b1bd
Santiago Pastorino html_escape should escape single quotes
https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content
Closes #7215

Conflicts:
	actionpack/test/template/erb_util_test.rb
	actionpack/test/template/form_tag_helper_test.rb
	actionpack/test/template/text_helper_test.rb
	actionpack/test/template/url_helper_test.rb
	activesupport/lib/active_support/core_ext/string/output_safety.rb
2bdb4ec
Santiago Pastorino html_escape should escape single quotes
https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content
Closes #7215

Conflicts:
	actionpack/test/template/erb_util_test.rb
	actionpack/test/template/form_tag_helper_test.rb
	actionpack/test/template/text_helper_test.rb
	actionpack/test/template/url_helper_test.rb
	activesupport/lib/active_support/core_ext/string/output_safety.rb
28f2c6f
Rafael Mendonça França Fix html_escape with Ruby 1.8 2f4b82f
Rafael Mendonça França Fix html_escape with Ruby 1.8 ebddf75
Rafael Mendonça França More `:rails_env` cleanup.
`Rails.env` already use development if ENV["RAILS_ENV"] is not present.
e23b26c
Rafael Mendonça França More `:rails_env` cleanup.
`Rails.env` already use development if ENV["RAILS_ENV"] is not present.
469d885
José Valim Merge pull request #6084 from brainopia/support_for_magic_domain_on_a…
…ll_stores

Support cookie jar options for all cookie stores
393c652
Santiago Pastorino Add CHANGELOG entry 5f9ae95
Santiago Pastorino Bump to 3.2.8.rc2 65b5e35
Santiago Pastorino

@spastorino yes, I that backported this. I was trying to fix #2483 (comment) but seems that this commit not fixed. I'll work on it later.

Reverted @ a48ea68

added some commits
Rafael Mendonça França Revert "Merge pull request #6084 from brainopia/support_for_magic_dom…
…ain_on_all_stores"

This reverts commit 393c652.

This commit was supposed to fix a bug but it add more failures.
a48ea68
Rafael Mendonça França Merge pull request #7140 from seamusabshere/patch-1
Make sure :environment task is executed before db:schema:load or
db:structure:load

Conflicts:
	activerecord/CHANGELOG.md
0fb6bbd
Ravil Bayramgalin

If you wish, I can find out why 3.2 branch does not work with the patch, since I've wrote this fix for the master – https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#L84.

@brainopia if you can please do it.

and others added some commits
Prem Sichanugrist Do not include application.js if it doesn't exists
Rails were including 'application.js' to the pack when using
`javascript_include_tag :all` even there's no application.js in the
public directory.
8e2a05b
Prem Sichanugrist Rearrange example output of javascript_include_tag 6c46730
Rafael Mendonça França Merge pull request #7276 from sikachu/3-2-stable-js-include-tag-fix
Do not include application.js if it doesn't exists
3cc872d
José Valim Merge pull request #7167 from route/missed_extend
Missed extend for eager_autoload

This backport is trying to fix a bug with eager load
ActiveRecord::Associations modules
29fb31f
Aaron Patterson Merge pull request #5872 from evtuhovich/prepared_statement_fix
Remove prepared statement from system query in postgresql adapter
Conflicts:
	activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
a935c7a
Rafael Mendonça França Add CHANGELOG entry for a935c7a ea48732
Joshua Peek Loosen sprockets version restriction 83e0c95
David Heinemeier Hansson Merge pull request #7283 from josh/bump-sprockets
Allow newer versions of Sprockets
185d74c
Aaron Patterson make assertions easier to track down d498b5e
Joshua Peek Fix invalid asset compile assertions
Logical paths to compile should require an extension
635817e
Rafael Mendonça França Merge pull request #7284 from josh/fix-asset-tests
Fix asset integration test (3-2-stable)
c35853f
Rafael Mendonça França Remove references to old behavior with headers at
ActionDispatch::Integration::ResquestHelpers.

The behavior has removed at 4a6f4b9 to
increase the compatibility with Rack::Test

Closes #7136

[ci skip]
4147e0f
Rafael Mendonça França Fix CHANGELOG [ci skip] 2e98e0f
Jeremy Walker Ported PR #4856 to 3-2-stable. 2a6039a
Jeremy Walker Backport #7173. af6dfdb
Rafael Mendonça França Add CHANGELOG entry 5c2fc69
Rafael Mendonça França Merge pull request #7299 from iHiD/3-2-stable-store
Ported PR #4856 to 3-2-stable.
0f9a6a7
Santiago Pastorino escape select_tag :prompt values
CVE-2012-3463
6d0526d
Santiago Pastorino Do not mark strip_tags result as html_safe
Thanks to Marek Labos & Nethemba

CVE-2012-3465
e91e4e8
Santiago Pastorino Add release date to CHANGELOGs ddedf5d
Santiago Pastorino Bump to 3.2.8 64146cf
Santiago Pastorino Merge branch '3-2-8' into 3-2-stable 7987e74
Mark Turner Add html_escape note to CHANGELOG e8c0d73
Santiago Pastorino Merge pull request #7309 from amerine/3-2-stable
Add html_escape note to CHANGELOG
ae2383d
Ravil Bayramgalin Revert "Revert "Merge pull request #6084 from brainopia/support_for_m…
…agic_domain_on_all_stores""

This reverts commit a48ea68.
058dc9a
Ravil Bayramgalin Dont stream back cookie value if it was set to the same value bbe634e
Ravil Bayramgalin Test actual content of permanent cookie ca07bc0
Rafael Mendonça França Merge pull request #7286 from kennyj/fix_7191
Fix #7191. Remove unnecessary transaction when assigning has_one associations.
Conflicts:
	activerecord/test/cases/associations/has_one_associations_test.rb
2e00074
Rafael Mendonça França Add CHANGELOG entry for #7286 3307a2e
Piotr Sarnacki [guides] Add info about CHANGELOGs to contributing guide dad717a
Ravil Bayramgalin Update changelog to reflect support of cookie jar options for all
session stores
2e04a34
Rafael Mendonça França Merge pull request #7316 from brainopia/backport_fix_session_store_op…
…tions

Backport of "Support cookie jar options for all cookie stores" for 3.2-stable
20f18cb
Rafael Mendonça França Merge pull request #6073 from daveyeu/restore-state-on-record-invalid
Restore state on create when ActiveRecord::RecordInvalid is raised
Conflicts:
	activerecord/CHANGELOG.md
786713a
fingermark

The code has if autosave && ... on line 342 and elsif autosave != false && ... on line 344. Why not be consistent and change line 344 to elsif autosave && ...?

and others added some commits
Jeremy Kemper Backport 5c51cd0: #send_file leans on Rack::Sendfile to X-Accel-Redir…
…ect the file's path, so opening the file to set the response body is wasteful. Set a FileBody wrapper instead that responds to to_path and streams the file if needed.
bccc35b
Rafael Mendonça França Do not use update_column where update_attribute is not interchangeable
Revert "Deprecate update_attribute."

This reverts commit b081f6b.

Reason: Since the new deprecation policy we removed the deprecation of
update_attribute but we didn't reverted the changes to use
update_column.

Fixes #7306
8055cd6
Carlos Antonio da Silva Merge pull request #7027 from erichmenge/patch/jruby_send_file
Backport 5c51cd0 to fix an issue with jRuby encodings. Fixes #6844
b4dce47
Carlos Antonio da Silva Remove duplicated changelog entry [ci skip] 4e31f82
Jon Leighton Use benchmark/ips to measure AR performance
This means we can more easily compare numbers, and we don't have to
specify a single N for all reports, which previously meant that some
tests were running many more/fewer iterations than necessary.
bfff0ed
Jon Leighton Increase benchmark time to 20 seconds.
I think that 5 seconds was a bit low for our purposes.

Also enable it to be configured via env vars.

We also need to scale the number of records up/down depending on how
long we're running the benchmark for.
25f6549
Rafael Mendonça França Merge pull request #7352 from aripollak/microsecond-timestamp
Fix occasional microsecond conversion inaccuracy
Conflicts:
	activerecord/CHANGELOG.md
d6dbd7f
Rafael Mendonça França Ruby 1.8 doesn't have to_r defined to NilClass and Float.
Use round to get the right conversion
3c61642
Joe Rafaniello Table#remove passed an array to remove_column, which is deprecated. 066ecf0
Rafael Mendonça França Merge pull request #7388 from ManageIQ/fix_table_remove_passing_array…
…_deprecation

Table#remove passed an array to remove_column, which is deprecated.
b3bea49
Carlos Antonio da Silva Merge pull request #7377 from brainopia/use_inversed_parent_for_first…
…_and_last_child

Use inversed parent for first and last child of has_many association

[Backport] Closes #3223.

Conflicts:
	activerecord/lib/active_record/associations/collection_association.rb
fdf4eae
Rafael Mendonça França Merge pull request #6986 from kennyj/fix_6975
Fix #6975. Round usec when writing timestamp attribute.

Conflicts:
	activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
8905c1f
Rafael Mendonça França Merge pull request #7410 from sandeepravi/default_options_helper_value
option_tags coerced to "" instead of nil

Closes #7404
c091fae
Rafael Mendonça França Merge pull request #5210 from Pliny/masteri
Fix for #5200

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/counter_cache.rb
648c5a1
Rafael Mendonça França Use a model without counter cache to test read-only attributes 015cac7
Carlos Antonio da Silva Use Ruby 1.8 hash syntax
Introduced in backport 648c5a1.
d5fe242
Clint
Owner

It's an assert_match, and I wanted to avoid comparing against ' because it's escaped

Egor Homakov

are you serious?..

Owner

@homakov I don't understand what do you mean

and others added some commits
Arun Agrawal We need to have 1-0-stable for joureny gem in edge
Problem : Edge rails can't bundle
Fixes #7437
0ec7b35
Santiago Pastorino Merge pull request #7438 from arunagw/3-2-stable-edge-rails-fix
We need to have 1-0-stable for joureny gem in edge
b76a963
Vasiliy Ermolovich correct handling of date selects when using both disabled and discard…
… options

we should take disabled option not only from `html_options` hash but from
`options` hash too like `build_select` method does it. So

datetime_select("post", "updated_at", { :discard_minute => true }, { :disabled => true })
datetime_select("post", "updated_at", :discard_minute => true , :disabled => true)

both these variants work now

closes #7431
4b19855
Rafael Mendonça França Merge pull request #7446 from nashby/backport-fix-issue-7431
backport #7435
dcb2bee
Xavier Noria fixes a bug in dependencies.rb
loaded stores file names without the .rb extension, but search_for_file
returns file names with the extension.

The solution is hackish, but this file needs a revamp.
8333b93
Xavier Noria CHANGELOGs are now per branch
Check 810a50d for the rationale.
8efced6
Pratik Ensure association preloading properly merges default scope and assoc…
…iation conditions

Conflicts:

	activerecord/test/models/reader.rb
58d35f6
Marc-André Lafortune Fix bug when Rails.application is defined but is nil. See #881 728e925
Piotr Sarnacki Merge pull request #7474 from steveklabnik/backport_89ebd28
Backport 89ebd28 to 3-2-stable
f84fc39
Xavier Noria documents after_(commit|rollback) cabab37
Yves Senn set the configured #inheritance_column on #become (#7503)
I had to create a new table because I needed an STI table,
which does not have both a "type" and a "custom_type"

the test fails with:
  1) Error:
test_alt_becomes_works_with_sti(InheritanceTest):
NoMethodError: undefined method `type=' for #<Cabbage id: 1, name: "my cucumber", custom_type: "Cucumber">
    /Users/username/Projects/rails/activemodel/lib/active_model/attribute_methods.rb:432:in `method_missing'
    /Users/username/Projects/rails/activerecord/lib/active_record/attribute_methods.rb:100:in `method_missing'
    /Users/username/Projects/rails/activerecord/lib/active_record/persistence.rb:165:in `becomes'
    test/cases/inheritance_test.rb:134:in `test_becomes_works_with_sti'
    test/cases/inheritance_test.rb:140:in `test_alt_becomes_works_with_sti'

Conflicts:

	activerecord/test/cases/inheritance_test.rb
01d09a6
Rafael Mendonça França Merge pull request #7514 from senny/issue_7503_3_2_stable
set the configured #inheritance_column on #become (#7503)
87ac5b4
Rafael Mendonça França Merge pull request #7337 from adzap/string_to_dummy_time
Fix for time type columns with invalid time value
Conflicts:
	activerecord/CHANGELOG.md
5054e26
Carlos Antonio da Silva Update Active Model xml serialization test to reflect a change in bui…
…lder

Due to a change in builder, nil values and empty strings now generates
closed tags, so instead of this:

    <pseudonyms nil=\"true\"></pseudonyms>

It generates this:

    <pseudonyms nil=\"true\"/>

Document this change in Rails so that people can track it down easily if
necessary.

Conflicts:
	activemodel/CHANGELOG.md
d65adc7
Carlos Antonio da Silva Fix AR tests due to builder change with nil values / empty strings
Check 0180e09 for more reasoning about
that.
77dd3be
Carlos Antonio da Silva Fix AS tests due to builder change with nil values / empty strings
Check 0180e09 for more reasoning about
that.
146eaf3
Thiago Pradi ConnectionAdapters::Column.type_cast_code should always convert value…
…s to integer calling #to_i
652107e
Rafael Mendonça França Merge pull request #7582 from tchandy/fix_type_cast_code
type_cast_code should always convert values to integer calling #to_i
924ad60
Toshinori Kajihara Backported #7572 to 3-2-stable. Use config['encoding'], because datab…
…ase configuration use not charset but encoding.
9630485
Rafael Mendonça França Merge pull request #7603 from kennyj/fix_charset_vs_encoding_32
Backported #7572 to 3-2-stable. Use config['encoding'], because database configuration use not charset but encoding.
f568280
Backport PostgreSQL auto-reconnect test coverage
6d5f4de
Simulated & actual (manual/skipped) PostgreSQL auto-reconnection tests.

4b1bca0
Stop being silly with formatting of method aliasing.

c381d5c
Fix just-plain-wrongness of psql auto-reconnect test.

1e17a9d
Fix only-once stub logic.

f16c204
Changelog for PostgreSQL auto-reconnect test coverage backport.
f48bb01
Rafael Mendonça França Merge pull request #7632 from stevecj/3-2-stable
3 2 stable
84c7896
Francesco Rodríguez fix markdown markup in AR/CHANGELOG 2326d46
Carlos Antonio da Silva Merge pull request #7633 from frodsan/patch-5
Fix markdown markup in AR/CHANGELOG [ci skip]
5aaf79a
Rafael Mendonça França `skip` in Ruby 1.8 doesn't skip the test case without return dbfdd00
Rafael Mendonça França Backport explain fixes.
* Mark as SCHEMA some schema database queries. #7648
* Don't explain queries except normal CRUD sql. #7657

Closes #6458
Closes #7544
6abe0e7
Rafael Mendonça França Merge pull request #7651 from steveklabnik/issue_3956
Don't preserve SELECT columns on COUNT

Closes #7651

Conflicts:
	activerecord/test/cases/associations/has_many_associations_test.rb
8432d03
Rafael Mendonça França Merge pull request #7666 from kennyj/fix_9fa3f102813eeeec440abd75870d…
…fa7b23835665

Fix warning: method redefine. Testcase name are duplicated.
07c8055
Rafael Mendonça França Merge pull request #7661 from ernie/build-join-records-on-unsaved-hmt
Fix collection= on hm:t join models when unsaved
ee43989
Yves Senn log 404 status when ActiveRecord::RecordNotFound was raised (#7646)
Conflicts:
	actionpack/CHANGELOG.md
	actionpack/lib/action_controller/log_subscriber.rb
dd76b3b
Jonathan Rochkind backport fair connection pool 02b2335 to 3-2-stable 0693e07
Rafael Mendonça França Merge pull request #7675 from jrochkind/fair_conn_pool_backport
backport fair connection pool 02b2335 to 3-2-stable
24a7774
Peter Wagenet Respect `config.digest = false` for `asset_path`
Previously, the `asset_path` internals only respected the `:digest`
option, but ignored the global config setting. This meant that
`config.digest = false` could not be used in conjunction with
`config.compile = false` this corrects the behavior.
1ac19c1
Rafael Mendonça França Merge pull request #7672 from wagenet/asset_path_digest_fix
Respect `config.digest = false` for `asset_path`
7c5454e
Steve Klabnik Add upgrading note to 3.1 release notes.
See #7685.
1929d9f
Rafael Mendonça França Merge pull request #7686 from steveklabnik/add_upgrade_note
Add upgrading note to 3.1 release notes.
29ebec7
Rafael Mendonça França Cache columns metadata to avoid extra while testing a82f1e3
Rafael Mendonça França Merge pull request #7668 from Draiken/fix_issue_6497
Removing to_shorthand to fix #6497
Conflicts:
	actionpack/CHANGELOG.md
61d5d2d
Jeremy Kemper Load the environment after creating the database
Conflicts:
	activerecord/lib/active_record/railties/databases.rake
c41f9c1
Toshinori Kajihara Fix #6962. AS::TimeWithZone#strftime responds incorrectly to %:z and …
…%::z format strings.
4e715e3
Rafael Mendonça França Merge pull request #7718 from kennyj/fix_6962-32
[3-2-stable] Fix #6962. AS::TimeWithZone#strftime responds incorrectly to %:z and %::z format strings.
50a76c1
Rafael Mendonça França Revert "backport fair connection pool 02b2335 to 3-2-stable"
This reverts commit 0693e07.

Revert "Cache columns metadata to avoid extra while testing"

This reverts commit a82f1e3.

Reason: This is causing failures in the postgresql build.
See http://travis-ci.org/#!/rails/rails/builds/2485584

Related with #7675
e4018a0
Rafael Mendonça França Revert "Respect `config.digest = false` for `asset_path`"
This reverts commit 1ac19c1.

Conflicts:
	actionpack/CHANGELOG.md

Reason: This is causing failures in the railties build.
See http://travis-ci.org/#!/rails/rails/jobs/2491787

Related with #7672
54f5574
Rafael Mendonça França Explictly set the assets digest option to false 9d07ace
Rafael Mendonça França Revert "Revert "Respect `config.digest = false` for `asset_path`""
This reverts commit 54f5574.

Reason: the last commit fixed the failing case
98f8021
Aaron Patterson Merge pull request #3544 from amatsuda/_field_changed
Rename field_changed? to _field_changed? so that users can create a field named field
Conflicts:

	activerecord/lib/active_record/core.rb
	activerecord/test/cases/dirty_test.rb
b8fba55
Rafael Mendonça França Merge pull request #7723 from steveklabnik/backport_3554
Backport #3544 to 3-2-stable
7b545ff
Rafael Mendonça França Fix invalid ruby 1.8 syntax 114e180
Jonathan Rochkind ConnectionPool accepts spec key 'checkout_timeout'
Backport of #6441 cb6f839 . Old 'wait_timeout' is still supported,
but conflicts with mysql2 using that spec key for different thing.
'checkout_timeout' can now be used taking precedence for ConnectionPool
over 'wait_timeout'.
3908706
Rafael Mendonça França Merge pull request #7684 from jrochkind/connection_pool_timeout_key_b…
…ackport

ConnectionPool accepts spec key 'checkout_timeout' (Backport)
8800aae
Jeremy Kemper Only apply log tags if the logger supports it 08ca483
Jeremy Kemper Log newlines separately to ensure the 'Started GET ...' line has a ta…
…g on the same line
032c2b6
Jeremy Kemper Add logger.push_tags and .pop_tags to complement logger.tagged
Avoid memory leak from unflushed logs on other threads leaving tags behind.

Conflicts:
	activesupport/CHANGELOG.md
	activesupport/lib/active_support/tagged_logging.rb
	activesupport/test/tagged_logging_test.rb
20f5f08
Jeremy Kemper Tune up Rails::Rack::Logger. Only put space between requests in devel…
…opment logs.

Conflicts:
	railties/test/application/rack/logger_test.rb
35a1750
Jeremy Kemper Shush syntax warnings ddba97f
Jeremy Kemper Shush uninitialized @_layout warning c203557
Jeremy Kemper Hashrocket for 1.8 support 8ca05c2
backport 68677ff 8dbf337
Aaron Patterson Merge pull request #7785 from okcwest/3-2-stable
backport 68677ff
e1a10b1
Don't paramify ActionDispatch::Http::UploadedFile in tests
To test uploading a file without using fixture_file_upload, a posted
ActionDispatch::Http::UploadedFile should not be paramified (just like
Rack::Test::UploadedFile).
(Rack::Test::UploadedFile and ActionDispatch::Http::UploadedFile don't
share the same API, tempfile is not accessible on
Rack::Test::UploadedFile as discussed in
brynary/rack-test#30)
c53e5de
Rafael Mendonça França Merge pull request #7786 from yabawock/3-2-stable
Backport "Don't paramify ActionDispatch::Http::UploadedFile in tests"
c2a7084
Rafael Mendonça França Merge pull request #7659 from HugoLnx/template_error_no_matches_rebased
REBASED: fixing assert_template bug when template matches expected, but not ends with
Conflicts:
	actionpack/CHANGELOG.md
	actionpack/lib/action_controller/test_case.rb
7d17cd2
Rafael Mendonça França New CHANGELOG entries always in the top [ci skip] d77d4a8
Steve Klabnik Fix reference to code sample in Getting Started.
Fixes #7799.
2475882
Xavier Noria Merge pull request #7802 from steveklabnik/issue_7799
Fix reference to code sample in Getting Started.
5cb5092
Jeremy Kemper Asset manifest includes aliases for foo.js -> foo/index.js and vice v…
…ersa. Bump Sprockets requirements from 2.1+ to 2.2+ and let it answer "should we compile this asset?" for us.
19987b6
Rafael Mendonça França Since File instance doesn't respond to #open use a double to test the
behavior added at c53e5de
628e38d
Rafael Mendonça França Merge pull request #6450 from iHiD/resource_generator_routes_master
Master branch: Fixed generated whitespace in routes when using namespaced resource.

Merge pull request #7811 from iHiD/resource_generator_routes_master

Fix the build (Broken scaffold routes test)
a02f67b
Rafael Mendonça França Merge pull request #7789 from senny/7777_resource_functions_modify_op…
…tions

resource and resources do no longer modify passed options
3b5bc8d
Rafael Mendonça França Merge pull request #7797 from senny/7459_prefix_tempalte_assertion_va…
…riables

prefix TemplateAssertions ivars.

Closes #7459
Conflicts:
	actionpack/lib/action_controller/test_case.rb
	actionpack/lib/action_view/test_case.rb
2bad605
Magnus Bergmark

Thanks a lot!

I can't believe this was so damn easy. I really tried looking into it before and it seemed much more complicated back then :)

This commit is adding /index.* aliases for every asset in my manifest.yml, including images. I don't think this is necessary, so it can be limited by checking if the index file exists with something like:

aliased_path = aliased_path_for asset.logical_path
if File.exists? "#{target}/#{aliased_path}"
  manifest[aliased_path] = digest_path
end
Owner

Sounds good @ndbroadbent - giving it a shot?

Could move the file existence check into aliased_path_for:

    def aliased_path_for(logical_path)
      if File.basename(logical_path).start_with?('index')
        logical_path.sub(/\/index([^\/]+)$/, '\1')
      else
        aliased_path = logical_path.sub(/\.([^\/]+)$/, '/index.\1')
        aliased_path if File.exist?("#{target}/#{aliased_path}")
      end
    end

Then skip absent aliases:

          if aliased_path = aliased_path_for(asset.logical_path)
            manifest[aliased_path] = digest_path
          end
Owner

@rwz Simple result... of a long evening full of facepalms :)

I tried a few different approaches, but our hands are tied by asset digests which leave us without a useful sprockets environment. So the only avenue left is to use the manifest. And sprockets itself doesn't normalize logical paths for us, or even express a preference for one form over another -- foo.js and foo/index.js are peers in its eyes, yet #each_logical_path yields foo/index.js. Argh!

@jeremy, that looks great, thanks!

While we're on the topic of assets in Rails 3.2, I was wondering if you might be interested in taking a look at my pull request to improve asset compilation: #7866

and others added some commits
Rafael Mendonça França Merge pull request #7822 from lulalala/reset-counter-cache-for-has-ma…
…ny-through

Fix reset_counters crashing on has_many :through associations.
Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/counter_cache.rb
3f0bc97
Santiago Pastorino Refactor
Conflicts:
	activerecord/lib/active_record/counter_cache.rb
288885f
lihan Update supported ruby versions error message in ruby_version_check.rb 36261c8
Rafael Mendonça França Merge pull request #7836 from lihanli/error-msg-update
Update supported ruby versions error message in ruby_version_check.rb
95369a5
Rafael Mendonça França Merge pull request #6978 from frodsan/count_nosql_unsaved_parent
Count returns 0 without querying if parent is not saved
9896729
Nathan Broadbent

Sorry, should have added my comment here as a line note: 19987b6#commitcomment-1956232

and others added some commits
Rafael Mendonça França Merge pull request #7850 from senny/5920_postgres_adapter_table_with_…
…capital_letters

postgres, quote table names when fetching the primary key (#5920)
Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
de360ac
Rafael Mendonça França Merge pull request #7848 from senny/3415_assert_template_has_nil_vari…
…able

can't pass :locals to #assert_template without a view test case (#3415)
Conflicts:
	actionpack/CHANGELOG.md
92d7612
Riley Martinez-Lynch Accept :remote as symbol in link_to options
Accept either :remote or 'remote' in both the html_options and
(url_)options hash arguments to link_to.
380800e
Rafael Mendonça França Use the Ruby 1.8 hash syntax f668ab9
Steve Klabnik
Collaborator

:shipit:

and others added some commits
Rafael Mendonça França Merge pull request #7865 from teleological/link_to_remote_3_2
Accept :remote as symbol in link_to options (backport)
bf07c79
Jeremy Kemper Backport 1a70499
Tag the blank log line between dev requests so it's easier to filter out entire requests with grep -v without leaving a stray newline behind. Example:

  # Tag asset requests so it's easy to filter them from dev logs
  config.log_tags = [
    -> request { :assets if request.path.starts_with?(config.assets.prefix) },
    -> request { request.uuid }
  ]

  # Watch the logs, ignoring asset requests
  $ tail -100f log/development.log | grep -v assets
fb9c001
Michael Fairley Eager autoload ActiveRecord association helpers de1b687
John Firebaugh Eager autoload Preloader classes
Without eager autoloading, these would be autoloaded
only when #preloader_for is called, which is too late
in threaded applications.
2bed954
Rafael Mendonça França Merge pull request #7905 from jfirebaugh/eager_autoload_3-2
Backport eager autoloading fixes
eefb344
Ernie Miller Fix has_many assocation w/select load after create
If you create a new record via a collection association proxy that has
not loaded its target, and which selects additional attributes through
the association, then when the proxy loads its target, it will
inadvertently trigger a deprecation notice during attribute writing when
CollectionAssociation#merge_target_lists attempts to do its thing, since
the newly loaded records will possess attributes the created record does
not.
990a938
Rafael Mendonça França Merge pull request #7925 from ernie/3-2-fix-collection-associations-w…
…ith-select

Fix has_many assocation w/select load after create
84c3774
Arturo Pie #7914 get default value when type uses schema name
PostgreSQL adapter properly parses default values when using multiple
schemas and domains.

When using domains across schemas, PostgresSQL prefixes the type of the
default value with the name of the schema where that type (or domain) is.

For example, this query:
```
SELECT a.attname, d.adsrc
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = "defaults"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum;
```

could return something like "'<default_value>'::pg_catalog.text" or
"(''<default_value>'::pg_catalog.text)::text" for the text columns with
defaults.

I modified the regexp used to parse this value so that it ignores
anything between ':: and \b(?:character varying|bpchar|text), and it
allows to have optional parens like in the above second example.
3980465
Arturo Pie 7914 Using a better way to get the defaults from db.
Changes:

* According to postgreSQL documentation:
(http://www.postgresql.org/docs/8.2/static/catalog-pg-attrdef.html)
we should not be using 'adsrc' field because this field is unaware of
outside changes that could affect the way that default values are
represented. Thus, I changed the queries to use
"pg_get_expr(adbin, adrelid)" instead of the historical "adsrc" field.

* Remove parsing of character type default values for 8.1 formatting since
Rails doesn't support postgreSQL 8.1 anymore.

* Remove misleading comment unrelated to code.
3006c59
Rafael Mendonça França Merge pull request #7940 from arturopie/7914-backport-to-3-2-stable
Backport fix of issue #7914 to 3-2-stable
b3485b7
Aaron Patterson Synchronize around deleting from the reserved connections hash.
Fixes #7955
d92e66f
Santiago Pastorino Merge pull request #7371 from csmuc/fix_dup_validation_errors
Dup'ed ActiveRecord objects may not share the errors object
Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/cases/dup_test.rb
9a38e73
Martin Grandrath Use `Rails.env` instead of `ENV['RAILS_ENV']`; #7951
`ENV['RAILS_ENV']` is not defined unless explicitly specified on the
command line when running `rake db:structure:load`. This patch lets
the rake task retrieve the environment from `Rails.env` which defaults
to "development".
f4ddc49
Martin Grandrath Grandrath closed this
Andrew White
Owner

I think this needs to be reverted as it may break quite a few apps. The shorthand syntax has historically ignored everything in the scope so changing it in a patch release is probably too risky. We definitely need to sort out the shorthand syntax for 4.0 though - I'll drop into Campfire later to discuss what needs fixing.

@pixeltrix yes I was waiting the release because of this guy issue. @rafaelfranca was trying to fix it in his branch https://github.com/rafaelfranca/rails/tree/route_fix Please let's discuss in CF so we can release the final version properly :heart:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.