| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
Related to 761bc751d31c22e2c2fdae2b4cdd435b68b6d783 and
eb876c4d07130f15be2cac7be968cc393f959c62
Conflicts:
activerecord/lib/active_record/relation/batches.rb
activerecord/test/cases/batches_test.rb
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This reverts commit 61d5d2d8a97fd289b81991cd79dca3112e7ca135.
Conflicts:
actionpack/CHANGELOG.md
REASON: This added a backward incompatible change.
|
| |
|
|
|
|
| |
Also related to #8087. Thanks @al2o3cr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When calling first(n) or last(n) in a collection, Active Record was
improperly trying to set the inverse of instance in case that option
existed. This change was introduced by
fdf4eae506fa9895e831f569bed3c4aa6a999a22.
In such cases we don't need to do that "manually", since the way
collection will be loaded will already handle that, so we just skip
setting the inverse association when any argument is given to
first(n)/last(n).
The test included ensures that these scenarios will have the inverse of
instance set properly.
Fixes #8087, Closes #8094.
|
|
|
|
|
|
|
|
|
| |
This method returns the status of the operation,
but as we generally do in the code base it does
not commit to any particular exact value. Hence,
we do not have to check for a singleton, because
if the implementation changes and returns some
other true value the test should pass.
|
|\
| |
| | |
Fix ActiveRecord#update_column return value
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 7d17cd2cbfc086f5aa9dd636e1207eb130150428.
Conflicts:
actionpack/CHANGELOG.md
Reason: This added a regression since people were relying on this buggy behavior.
This will introduce back #3849 but we will be backward compatible in
stable release.
Fixes #8068.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
senny/7459_prefix_tempalte_assertion_variables"
This reverts commit 2bad605873b5b720d77ae6388a995827ab7fe705.
Conflicts:
actionpack/CHANGELOG.md
Reason: This added a regression related with shoulda-matchers, since it
is expecting the instance variable @layouts
See https://github.com/thoughtbot/shoulda-matchers/blob/9e1188eea68c47d9a56ce6280e45027da6187ab1/lib/shoulda/matchers/action_controller/render_with_layout_matcher.rb#L74
This will introduce back #7459 but this stable release will be backward compatible.
Related with #8068.
|
|
|
|
|
|
| |
e6b41845efe2252fe7de6882e355c31f93c65cc3 fixes that issue too.
[ci skip]
|
| |
|
|
|
|
|
|
|
|
| |
This can occur if the user is using :integer columns to store boolean
values. Now we are handling the boolean values but it still raises if
the value can't type cast to integer and is not a boolean. See #7509.
Fixes #8067.
|
|\
| |
| |
| | |
fixed support for DATABASE_URL for rake db tasks
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Backport for #7521
- added tests to confirm establish_connection uses DATABASE_URL and
Rails.env correctly even when no arguments are passed in.
- updated rake db tasks to support DATABASE_URL, and added tests to
confirm correct behavior for these rake tasks. (Removed
establish_connection call from some tasks since in those cases
the :environment task already made sure the function would be called)
- updated Resolver so that when it resolves the database url, it
removes hash values with empty strings from the config spec (e.g.
to support connection to postgresql when no username is specified).
- updated ResolverTest to use current_adapter? to check the type of
the current adapter.
|
|/ |
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
| |
This reverts commit f7de647f2cd099ecf6434fa4a0db1ec297f1c32d.
We can't deprecate things in stable branches. I didn't not realized that
the pull request was for 3-2-stable
|
|\
| |
| | |
Should not eager_load app/assets
|
| | |
|
| |
| |
| |
| | |
E.g. don't eager-load app/assets even if app/* has the eager_load flag set.
|
| | |
|
| |
| |
| |
| |
| |
| | |
SQLite3Adapter#type_cast should not mutate arguments
Conflicts:
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
|
| |
| |
| |
| |
| |
| |
| |
| | |
Unbreak update_column/update_columns for the primary key attribute.
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/persistence.rb
activerecord/test/cases/persistence_test.rb
|
| |
| |
| |
| | |
Also remove the feature detecting for Ruby 1.9
|
| |
| |
| |
| | |
Checking for the constant doesn't work
|
| |
| |
| |
| |
| |
| |
| | |
Decode attributes pulled from URI.parse
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/connection_adapters/connection_specification.rb
|
| |
| |
| |
| |
| |
| | |
Do not render views when mail() isn't called. (NullMail refactoring)
Conflicts:
actionmailer/CHANGELOG.md
|
|\ \
| | |
| | | |
Removing JSON for other ruby
|
|/ /
| |
| |
| |
| |
| |
| | |
It's only required for 1.8 and for JRuby!
I was fixing a bug with JSON pure on 1.8.7
and I found that we have included json for other
1.8 > rubies also.
|
|/
|
|
| |
Fix AM::Serializers::Xml dependency
|
|\
| |
| | |
Adding a missing parenthesis in the doc of String#parameterize.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Fix behavior of `rake db:structure:load` for 3.2.8
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`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".
|
| | |
| | |
| | |
| | |
| | | |
This will make possible to do a frameworkless initialization since the
the default middleware stack is self contained.
|
|\ \ \
| |/ /
|/| | |
backport: active_model/validations requires necessary files to run
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| | |
Dup'ed ActiveRecord objects may not share the errors object
Conflicts:
activerecord/CHANGELOG.md
activerecord/test/cases/dup_test.rb
|
| |
| |
| |
| | |
Fixes #7955
|
|\ \
| | |
| | | |
Backport fix of issue #7914 to 3-2-stable
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
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.
|
|\ \
| | |
| | | |
Backport eager autoloading fixes
|