- 15 5月, 2014 1 次提交
-
-
由 Nat Budin 提交于
ActiveRecord::Relation::Merger's filter_binds method does not filter out bind variables when one of the attribute nodes has a string name, but the other has a symbol name, even when those names are actually equal. This can result in there being more bind variables than placeholders in the generated SQL. This is particularly an issue for PostgreSQL, where this is treated as an error. This patch changes the filter_binds method to make it convert both attribute names to strings before comparing.
-
- 12 5月, 2014 4 次提交
-
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
Closes #10802.
-
由 Innokenty Mihailov 提交于
Before this patch `Infinity`, `-Infinity` and `Nan` were read as `0`.
-
由 Patrick Robertson 提交于
In #10410 it was noted that you can no longer create PK's with the type of bigserial in PostgreSQL in 4.0.0.rc1. This is mostly because the newer adapter is checking for column type with the id column instead of just letting it pass through like it did before. Side effects: You may just create a PK column of a type that you really don't want to be your PK. As far as I can tell this was allowed in 3.2.X and perhaps an exception should be raised if you try and do something extremely dumb.
-
- 10 5月, 2014 2 次提交
-
-
由 Yves Senn 提交于
Closes #15024. These operations happen before instances are created. The current behavior is misleading and can result in broken behavior.
-
由 Arthur Neves 提交于
We are reverting these commits, because there are other caveats related to dirty attributes not being restored when a transaction is rollback. For instance, nested transactions cannot proper restore the dirty attributes state after a rollback. At the moment, the dirty attributes are scoped by the transaction. When we call `.save` on a record, the dirty attributes will be reset even if the transaction gets rollback. [related #13166] [related #15018] [related #15016] [closes #15019] This reverts commits * bab48f0a * b0fa7cf3. * 73fb39b6 * 37c23892. * 8d8d4f15 Revert "Merge pull request #13166 from bogdan/transaction-magic"
-
- 08 5月, 2014 3 次提交
-
-
由 Fred Wu 提交于
HABTM should fall back to using the normal CollectionAssociation's size calculation if the collection is not cached or loaded. This addresses both #14913 and #14914 for master.
-
由 Rafael Mendonça França 提交于
Closes #14989
-
由 Arthur Neves 提交于
[related #13166]
-
- 06 5月, 2014 2 次提交
-
-
由 Jenner LaFave 提交于
This makes table_name_suffix work the same as table_name_prefix when using namespaced models. Pretty much the same as 67d1cec4.
-
由 Rafael Mendonça França 提交于
-
- 05 5月, 2014 1 次提交
-
-
由 Bogdan Gusiev 提交于
This is a regression 4.0 -> 4.1 fix. In 4.1.0 Relation#join is delegated to Arel#SelectManager. In 4.0 series it is delegated to Array#join This patch puts back the behaviour of 4.0
-
- 03 5月, 2014 1 次提交
-
-
由 James Coleman 提交于
-
- 02 5月, 2014 1 次提交
-
-
由 Robin Dupret 提交于
-
- 01 5月, 2014 3 次提交
-
-
由 Eric Chahin 提交于
associations were not being saved. Fixes #13854. [Eric Chahin, Aaron Nelson, & Kevin Casey]
-
由 Hector Satre 提交于
-
由 Paul Nikitochkin 提交于
For mysql2/mysql adapters, `sql_mode` variable name set in `database.yml` as string, was ignored and `sql_mode` was set to use strict mode. Fixes #14895
-
- 26 4月, 2014 1 次提交
-
-
由 Kassio Borges 提交于
When used a custom join_table name on a habtm, rails was not saving it on Reflections. This causes a problem when rails loads fixtures, because it uses the reflections to set database with fixtures.
-
- 25 4月, 2014 2 次提交
-
-
由 Yves Senn 提交于
/cc @tenderlove
-
由 Jefferson Lai 提交于
The PG Adapter should use `:datetime` consistently instead of mapping mispellings to `:timestamp`. See #14513
-
- 24 4月, 2014 1 次提交
-
-
由 Lucas Mazza 提交于
Closes #14841.
-
- 23 4月, 2014 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 19 4月, 2014 1 次提交
-
-
由 Kuldeep Aggarwal 提交于
-
- 18 4月, 2014 1 次提交
-
-
由 Arthur Neves 提交于
Also add a Changelog entry [related #9702] [fixes #8928]
-
- 16 4月, 2014 3 次提交
-
-
由 Eric Chahin 提交于
Changed the NullRelation so that when count is called with #group it will properly return an empty hash instead of zero. Fixes issue #14721 Conflicts: activerecord/CHANGELOG.md
-
由 Rob Gilson 提交于
Closes #14222. This is a follow up to #6104 This does not have the backwards compatibility issues brought up in implementation to break.
-
由 Rafael Mendonça França 提交于
-
- 13 4月, 2014 1 次提交
-
-
由 Robin Dupret 提交于
-
- 12 4月, 2014 2 次提交
-
-
由 Lauro Caetano 提交于
Example: author.posts == Post.where(author_id: author.id) # => true Post.where(author_id: author.id) == author.posts # => true Fixes #13506
-
由 Rafael Mendonça França 提交于
-
- 11 4月, 2014 3 次提交
-
-
由 Yves Senn 提交于
[Yves Senn & Matthew Draper]
-
由 Yves Senn 提交于
[Yves Senn & Matthew Draper]
-
由 Simon Woker 提交于
-
- 07 4月, 2014 1 次提交
-
-
由 Evan Whalen 提交于
-
- 05 4月, 2014 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 04 4月, 2014 2 次提交
-
-
由 Yves Senn 提交于
There is no reason for the PG adapter to have a default limit of 255 on :string columns. See this snippet from the PG docs: Tip: There is no performance difference among these three types, apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs. In most situations text or character varying should be used instead.
-
由 Arthur Neves 提交于
Add tests to make sure scopes cannot be create with names such as: private, protected, public. Make sure enum values don't collide with those methods too.
-
- 03 4月, 2014 2 次提交
-
-
由 Lauro Caetano 提交于
It was causing error when using `with_options` passing a lambda as its last argument. class User < ActiveRecord::Base with_options dependent: :destroy do |assoc| assoc.has_many :profiles, -> { where(active: true) } end end It was happening because the `option_merger` was taking the last argument and checking if it was a Hash. This breaks the HasMany usage, because its last argument can be a Hash or a Proc. As the behavior described in this test: https://github.com/rails/rails/blob/master/activesupport/test/option_merger_test.rb#L69 the method will only accept the lambda, this way it will keep the expected behavior. See 9eaa0a34
-
由 Dmitry Lavrov 提交于
-