- 02 7月, 2013 9 次提交
-
-
由 Neeraj Singh 提交于
Calling default_scope without a proc will now raise `ArgumentError`.
-
由 Neeraj Singh 提交于
-
由 Neeraj Singh 提交于
Deprecated options `delete_sql`, `insert_sql`, `finder_sql` and `counter_sql` have been deleted.
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
-
由 Neeraj Singh 提交于
Removed deprecated methods `partial_updates`, `partial_updates?` and `partial_updates=`
-
由 Neeraj Singh 提交于
-
由 Neeraj Singh 提交于
-
- 29 6月, 2013 1 次提交
-
-
由 Yves Senn 提交于
-
- 28 6月, 2013 2 次提交
-
-
由 Jon Leighton 提交于
For example: class Post < ActiveRecord::Base default_scope -> { where published: true } end class Comment belongs_to :post end When calling `Comment.join(:post)`, we expect to receive only comments on published posts, since that is the default scope for posts. Before this change, the default scope from `Post` was not applied, so we'd get comments on unpublished posts.
-
由 Łukasz Strzałkowski 提交于
They were deprecated in 4.0, planned to remove in 4.1
-
- 26 6月, 2013 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
[ci skip]
-
由 Carlos Antonio da Silva 提交于
-
- 25 6月, 2013 1 次提交
-
-
由 Yves Senn 提交于
-
- 22 6月, 2013 2 次提交
-
-
由 Neeraj Singh 提交于
fixes #10669 While joining_values special treatment is given to string values. By flattening the array it ensures that string values are detected as strings and not arrays.
-
由 Neeraj Singh 提交于
currently `post.comments.find(Comment.first.id)` would load all comments for the given post to set the inverse association. This has a huge performance penalty. Because if post has 100k records and all these 100k records would be loaded in memory even though the comment id was supplied. Fix is to use in-memory records only if loaded? is true. Otherwise load the records using full sql. Fixes #10509
-
- 20 6月, 2013 2 次提交
- 19 6月, 2013 7 次提交
-
-
由 Jon Leighton 提交于
This reverts commit 2b817a5e, reversing changes made to 353a398b. Conflicts: activerecord/CHANGELOG.md Reason: the build broke
-
由 Neeraj Singh 提交于
If I have a query that produces sql `WHERE "users"."name" = 'a b'` then in the log all the whitespace is being squeezed. So the sql that is printed in the log is `WHERE "users"."name" = 'a b'`. This can be confusing. This commit fixes it by ensuring that whitespace is not squeezed. fixes #10982
-
由 Ben Woosley 提交于
This lets us do things like call: .find_each.with_index
-
由 Neeraj Singh 提交于
currently `post.comments.find(Comment.first.id)` would load all comments for the given post to set the inverse association. This has a huge performance penalty. Because if post has 100k records and all these 100k records would be loaded in memory even though the comment id was supplied. Fix is to use in-memory records only if loaded? is true. Otherwise load the records using full sql. Fixes #10509
-
由 Ben Woosley 提交于
As with #10992, this lets us call #with_index, etc on the results.
-
由 Ben Woosley 提交于
-
由 Ben Woosley 提交于
-
- 15 6月, 2013 3 次提交
-
-
由 Yves Senn 提交于
As you can also configure your database connection using `ENV["DATABASE_URL"]`, the fixture setup can't reply on the `.configurations` Hash. As the fixtures are only loaded when ActiveRecord is actually used (`rails/test_help.rb`) it should be safe to drop the check for an existing configuration.
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
-
- 14 6月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
For example, you need to change this: class Author < ActiveRecord::Base has_many :posts has_many :taggings, :through => :posts end class Post < ActiveRecord::Base has_one :tagging has_many :taggings end class Tagging < ActiveRecord::Base end To this: class Author < ActiveRecord::Base has_many :posts has_many :taggings, :through => :posts, :source => :tagging end class Post < ActiveRecord::Base has_one :tagging has_many :taggings end class Tagging < ActiveRecord::Base end
-
- 12 6月, 2013 1 次提交
-
-
由 Prathamesh Sonpatki 提交于
-
- 09 6月, 2013 2 次提交
- 04 6月, 2013 1 次提交
-
-
由 Adam Anderson 提交于
When then PostgreSQL visitor was [added](https://github.com/rails/rails/commit/6b7fdf3bf3675a14eae74acc5241089308153a34) `add_column` was no longer receiving the column options directly. This caused the options to be lost along the way.
-
- 28 5月, 2013 2 次提交
-
-
由 Sunny Ripert 提交于
-
由 Yves Senn 提交于
-
- 23 5月, 2013 2 次提交
-
-
由 Yves Senn 提交于
When removing records from a `has_many` association it used the `primary_key` defined on the association. Our test suite didn't fail because on all occurences of `:primary_key`, the specified column was available in both tables. This prevented the code from raising an exception but it still behaved badly. I added a test-case to prevent regressions that failed with: ``` 1) Error: HasManyAssociationsTest#test_has_many_assignment_with_custom_primary_key: ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: essays.first_name: UPDATE "essays" SET "writer_id" = NULL WHERE "essays"."writer_id" = ? AND "essays"."first_name" IS NULL ```
-
由 Rafael Mendonça França 提交于
-
- 18 5月, 2013 1 次提交
-
-
由 Prathamesh Sonpatki 提交于
-
- 15 5月, 2013 1 次提交
-
-
由 kennyj 提交于
-