- 23 12月, 2013 5 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 Paul Nikitochkin 提交于
Fixes: #13445
-
由 Kuldeep Aggarwal 提交于
-
由 Yves Senn 提交于
-
由 Damien Mathieu 提交于
Closes #13444
-
- 22 12月, 2013 1 次提交
-
-
由 Godfrey Chan 提交于
-
- 21 12月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 20 12月, 2013 5 次提交
-
-
由 Ben Angel 提交于
change CollectionAssociation's comments to say Association instead of AssociationProxy to match changes for 3.1 removing Association proxy.
-
由 Rafael Mendonça França 提交于
-
由 Arthur Neves 提交于
Need to check if valud also respond_to :id before calling it, otherwise things could explode.
-
由 Cody Cutrer 提交于
-
由 Carlos Antonio da Silva 提交于
[ci skip]
-
- 19 12月, 2013 7 次提交
-
-
由 Kuldeep Aggarwal 提交于
Previously, executing an insert SQL in PostgreSQL with a command like this: insert into articles( number) values( 5152 ) would not work because the adapter was unable to extract the correct articles table name.
-
由 Carlos Antonio da Silva 提交于
Change most tests to make use of assert_raise returning the raised exception rather than relying on a combination of flunk + rescue to check for exception types/messages.
-
由 nishant-cyro 提交于
-
由 Alex Ghiculescu 提交于
-
由 Kuldeep Aggarwal 提交于
-
由 Matthew Draper 提交于
The changes in c4044b2f meant the tests would error on a fresh DB.
-
由 rono23 提交于
-
- 18 12月, 2013 5 次提交
-
-
由 Jeremy Kemper 提交于
Assigning nil to a polymorphic belongs_to would nullify its _id field by not its _type field. Fixes failing test from c141dfc8. Regression from 1678e959.
-
-
由 Akshay Vishnoi 提交于
-
由 Jeremy Kemper 提交于
-
由 David Heinemeier Hansson 提交于
-
- 17 12月, 2013 5 次提交
-
-
由 Lauro Caetano 提交于
This change was necessary because the whitelist wouldn't work. It would be painful for users trying to update their applications. This blacklist intent to prevent odd bugs and confusion in code that call mutator methods directely on the `Relation`.
-
由 Carlos Antonio da Silva 提交于
-
由 Jeremy Kemper 提交于
Blast from the past, MySQL 4 era, when the password hashing style changed.
-
由 Akshay Vishnoi 提交于
-
由 Martin Emde 提交于
Using the name of an association in `where` previously worked only if the value was a single `ActiveRecrd::Base` object. e.g. Post.where(author: Author.first) Any other values, including `nil`, would cause invalid SQL to be generated. This change supports arguments in the `where` query conditions where the key is a `belongs_to` association name and the value is `nil`, an `Array` of `ActiveRecord::Base` objects, or an `ActiveRecord::Relation` object. # Given the Post model class Post < ActiveRecord::Base belongs_to :author end # nil value finds records where the association is not set Post.where(author: nil) # SELECT "posts".* FROM "posts" WHERE "posts"."author_id" IS NULL # Array values find records where the association foreign key # matches the ids of the passed ActiveRecord models, resulting # in the same query as Post.where(author_id: [1,2]) authors_array = [Author.find(1), Author.find(2)] Post.where(author: authors_array) # ActiveRecord::Relation values find records using the same # query as Post.where(author_id: Author.where(last_name: "Emde")) Post.where(author: Author.where(last_name: "Emde")) Polymorphic `belongs_to` associations will continue to be handled appropriately, with the polymorphic `association_type` field added to the query to match the base class of the value. This feature previously only worked when the value was a single `ActveRecord::Base`. class Post < ActiveRecord::Base belongs_to :author, polymorphic: true end Post.where(author: Author.where(last_name: "Emde")) # Generates a query similar to: Post.where(author_id: Author.where(last_name: "Emde"), author_type: "Author")
-
- 16 12月, 2013 4 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 Akshay Vishnoi 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
- 15 12月, 2013 1 次提交
-
-
由 Arthur Neves 提交于
db:test:clone and db:test:prepare use ActiveRecord::Base. configurations, so we need to load the rails environment, otherwise the config wont be in place.
-
- 14 12月, 2013 2 次提交
-
-
由 Cody Cutrer 提交于
also override drop_table in AbstractMySQLAdapter to properly drop temporary tables without committing the transaction
-
由 Arun Agrawal 提交于
* interpreted as a argument prefix
-
- 13 12月, 2013 4 次提交
-
-
由 Kassio Borges 提交于
This will fix the [broken test](https://github.com/rails/rails/commit/4a2650836680f51490e999c3c8441a2f9adff96e) `test_with_limiting_with_custom_select`. The query's result was built in a hash with column name as key, if the result have a duplicated column name the last value was overriding the first one.
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
-
由 Jeremy Kemper 提交于
Add a bunch of Relation -> Array delegate methods to the whitelist. This won't last - aim to switch back to a blacklist for mutator methods.
-