- 10 12月, 2012 2 次提交
-
-
由 itzki 提交于
-
由 Jeremy Kemper 提交于
Pending work on graceful app upgrades. Revert "Merge pull request #8439 from joshsusser/fixes" This reverts commit ce8ac393, reversing changes made to b0e7b6f6. Revert "Merge pull request #8431 from joshsusser/schemadump" This reverts commit 036d3e1c, reversing changes made to 0c692f4d. Revert "Merge branch 'joshsusser-master' into merge" This reverts commit 0c692f4d, reversing changes made to 2e299fca. Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb activerecord/test/cases/schema_dumper_test.rb
-
- 09 12月, 2012 1 次提交
-
-
由 Aaron Stone 提交于
in the new 'variables:' hash in each database config section in database.yml. The key-value pairs of this hash will be sent in a 'SET key = value, ...' query on new database connections. The configure_connection methods from mysql and mysql2 into are consolidated into the abstract_mysql base class.
-
- 08 12月, 2012 2 次提交
-
-
由 Caike Souza 提交于
These queries don't seem to work without the includes clause. [ci skip]
-
由 Carlos Antonio da Silva 提交于
The real win with these chain methods is where.not, that takes care of different scenarios in a graceful way, for instance when the given value is nil. where("author.id != ?", author_to_ignore.id) where.not("author.id", author_to_ignore.id) Both where.like and where.not_like compared to the SQL versions doesn't seem to give us that much: Post.where("title LIKE 'ruby on%'") Post.where.like(title: 'ruby on%'") Post.where("title NOT LIKE 'ruby on%'") Post.where.not_like(title: 'ruby on%'") Thus Rails is adding where.not, but not where.like/not_like and others.
-
- 07 12月, 2012 3 次提交
-
-
由 Carlos Antonio da Silva 提交于
When applying default_scope to a class with a where clause, using update_column(s) could generate a query that would not properly update the record due to the where clause from the default_scope being applied to the update query. class User < ActiveRecord::Base default_scope where(active: true) end user = User.first user.active = false user.save! user.update_column(:active, true) # => false In this situation we want to skip the default_scope clause and just update the record based on the primary key. With this change: user.update_column(:active, true) # => true Fixes #8436.
-
由 Carlos Antonio da Silva 提交于
-
由 Steve Klabnik 提交于
It was pointed out by @giner that the CHANGELOG entry for https://github.com/rails/rails/commit/78d5d6f8688bb7c45ba9a3ef893682231130da3f wasn't included. Here it is.
-
- 05 12月, 2012 2 次提交
-
-
由 claudiob 提交于
Sometimes, on Mac OS X, programmers accidentally press Option+Space rather than just Space and don’t see the difference. The problem is that Option+Space writes a non-breaking space (0XA0) rather than a normal space (0x20). This commit removes all the non-breaking spaces inadvertently introduced in the comments of the code.
-
由 kennyj 提交于
-
- 04 12月, 2012 1 次提交
-
-
由 Yves Senn 提交于
Closes #3313
-
- 03 12月, 2012 1 次提交
-
-
由 Josh Susser 提交于
-
- 02 12月, 2012 1 次提交
-
-
由 Josh Susser 提交于
migrated_at: timestamp when migration run fingerprint: md5 hash of migration source name: filename without version or extension
-
- 30 11月, 2012 1 次提交
-
-
由 Akira Matsuda 提交于
examples: Model.where.not field: nil #=> "SELECT * FROM models WHERE field IS NOT NULL Model.where.like name: 'Jeremy%' #=> "SELECT * FROM models WHERE name LIKE 'Jeremy%' this feature was originally suggested by Jeremy Kemper https://github.com/rails/rails/pull/5950#issuecomment-5591330 Closes #5950
-
- 29 11月, 2012 3 次提交
-
-
由 Jason Rush 提交于
Allows you to do BaseClass.new(:type => "SubClass") as well as parent.children.build(:type => "SubClass") or parent.build_child to initialize an STI subclass. Ensures that the class name is a valid class and that it is in the ancestors of the super class that the association is expecting.
-
由 Rafael Mendonça França 提交于
[ci skip]
-
由 Steve Klabnik 提交于
Fixes #7418.
-
- 28 11月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 25 11月, 2012 1 次提交
-
-
由 Alisdair McDiarmid 提交于
Setting a nil datetime attribute to a blank string should not cause the attribute to be dirty. Fix #8310
-
- 24 11月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
Introduced in 53ca22f2. Thanks @rochefort. [ci skip]
-
- 22 11月, 2012 3 次提交
-
-
由 Yves Senn 提交于
Closes #8265
-
由 Carlos Antonio da Silva 提交于
To perform a sum calculation over the array of elements, use to_a.sum(&block). Please check the discussion in f9cb645d for more context.
-
由 Carlos Antonio da Silva 提交于
This reverts commit f9cb645d. Conflicts: activerecord/CHANGELOG.md Revert "Allow blocks for count with ActiveRecord::Relation. Document and test that sum allows blocks" This reverts commit 9cc2bf69. Conflicts: activerecord/lib/active_record/relation/calculations.rb
-
- 21 11月, 2012 1 次提交
-
-
由 Bogdan Gusiev 提交于
-
- 20 11月, 2012 1 次提交
-
-
由 Victor Costan 提交于
-
- 19 11月, 2012 1 次提交
-
-
由 Jarek Radosz 提交于
-
- 17 11月, 2012 2 次提交
-
-
由 Thomas Hollstegge 提交于
If you want to change the STI type too, use AR::Base.becomes! instead
-
由 Carlos Antonio da Silva 提交于
-
- 12 11月, 2012 2 次提交
- 10 11月, 2012 1 次提交
-
-
由 Bogdan Gusiev 提交于
-
- 05 11月, 2012 1 次提交
-
-
由 Yves Senn 提交于
-
- 03 11月, 2012 2 次提交
-
-
由 Rafael Mendonça França 提交于
This was there due historical reasons since 7dc45818 to give the user the possibility to create unique indexes passing "UNIQUE" as the third argument
-
由 Rafael Mendonça França 提交于
Closes #8104
-
- 31 10月, 2012 3 次提交
-
-
由 Alexis Bernard 提交于
-
由 Nikita Afanasenko 提交于
Public method `attributes_before_type_cast` used to return internal AR structure (ActiveRecord::AttributeMethods::Serialization::Attribute), patch fixes this. Now behaves like `read_attribute_before_type_cast` and returns unserialised values.
-
由 kennyj 提交于
-
- 29 10月, 2012 3 次提交
-
-
由 Juanjo Bazán 提交于
-
由 Henrik N 提交于
Didn't work before because it updated the model-in-memory first, so the DB query couldn't find the record.
-
由 Yves Senn 提交于
-