- 05 10月, 2012 1 次提交
-
-
由 Yves Senn 提交于
-
- 04 10月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
Patches `CollectionAssociation#count` to return 0 without querying if the parent record is new. Consider the following code: class Account has_many :dossiers end class Dossier belongs_to :account end a = Account.new a.dossiers.build # before patch a.dossiers.count # SELECT COUNT(*) FROM "dossiers" WHERE "dossiers"."account_id" IS NULL # => 0 # after a.dosiers.count # fires without sql query # => 0 Fixes #1856.
-
- 03 10月, 2012 1 次提交
-
-
由 kennyj 提交于
-
- 02 10月, 2012 1 次提交
-
-
由 lulalala 提交于
The counter column name in the intermediate model need to be access via the through reflection.
-
- 29 9月, 2012 3 次提交
-
-
由 Yasuo Honda 提交于
because Oracle adapter uses upper case attribute/column name.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
When inserting new records, only the fields which have been changed from the defaults will actually be included in the INSERT statement. The other fields will be populated by the database. This is more efficient, and also means that it will be safe to remove database columns without getting subsequent errors in running app processes (so long as the code in those processes doesn't contain any references to the removed column).
-
- 26 9月, 2012 2 次提交
-
-
由 Jeremy Kemper 提交于
Fix destructive side effects from marshaling an association caused by 65843e1a
-
由 Yasuo Honda 提交于
i.e. Oracle database does not support these isolation levels. `:read_uncommitted` `:repeatable_read` This commit also works with other databases which do not support these isolation levels.
-
- 25 9月, 2012 1 次提交
-
-
由 Yasuo Honda 提交于
-
- 24 9月, 2012 1 次提交
-
-
由 John Foley 提交于
This commit allows a user to do something like: before_validation :do_stuff, :on => [ :create, :update ] after_validation :do_more, :on => [ :create, :update ]
-
- 22 9月, 2012 6 次提交
-
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
Related to 761bc751 and eb876c4d
-
由 Santiago Pastorino 提交于
This reverts commit 761bc751. This commit wasn't fixing any issue just using the same table for different models with different primary keys.
-
由 Jeremy Kemper 提交于
-
由 Jeremy Kemper 提交于
-
由 Jon Leighton 提交于
It's too hard to test this properly, so let's just check that there are no errors.
-
- 21 9月, 2012 3 次提交
-
-
由 Jon Leighton 提交于
If your database supports setting the isolation level for a transaction, you can set it like so: Post.transaction(isolation: :serializable) do # ... end Valid isolation levels are: * `:read_uncommitted` * `:read_committed` * `:repeatable_read` * `:serializable` You should consult the documentation for your database to understand the semantics of these different levels: * http://www.postgresql.org/docs/9.1/static/transaction-iso.html * https://dev.mysql.com/doc/refman/5.0/en/set-transaction.html An `ActiveRecord::TransactionIsolationError` will be raised if: * The adapter does not support setting the isolation level * You are joining an existing open transaction * You are creating a nested (savepoint) transaction The mysql, mysql2 and postgresql adapters support setting the transaction isolation level. However, support is disabled for mysql versions below 5, because they are affected by a bug (http://bugs.mysql.com/bug.php?id=39170) which means the isolation level gets persisted outside the transaction.
-
由 Carlos Antonio da Silva 提交于
-
由 Francesco Rodriguez 提交于
-
- 19 9月, 2012 1 次提交
-
-
由 Damien Mathieu 提交于
Closes #6960
-
- 17 9月, 2012 8 次提交
-
-
由 Ernie Miller 提交于
If assigning to a has_many :through collection against an unsaved object using the collection=[<array_of_items>] syntax, the join models were not properly created, previously.
-
由 kennyj 提交于
-
由 Guillermo Iguaran 提交于
-
由 Guillermo Iguaran 提交于
-
由 Guillermo Iguaran 提交于
-
由 Guillermo Iguaran 提交于
-
由 Guillermo Iguaran 提交于
-
由 Steve Klabnik 提交于
The COUNT clause of a finder_sql relationship is being rewritten from COUNT(*) to COUNT(table_name.*). This does not appear to be valid syntax in MySQL: ``` mysql> SELECT COUNT( table_name.* ) FROM `table_name`; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* ) FROM `table_name`' at line 1 ``` This fixes the bug, as well as adding tests so we don't re-introduce it in the future. Fixes #3956.
-
- 16 9月, 2012 2 次提交
-
-
由 kennyj 提交于
-
由 Toshiyuki Kawanishi 提交于
-
- 15 9月, 2012 7 次提交
-
-
由 Steve Klabnik 提交于
Due to its lack of thread safety, we're deprecating this, and it will be removed in Rails 4.1. Fixes #4060.
-
由 Jon Leighton 提交于
Accidentally checked in commented test code. Fail. >_<
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
This method was first seen in 045713ee, and subsequently reimplemented in fb2325e3. According to @jeremy, this is okay to remove. He thinks it was added because at the time we didn't have much transaction state to keep track of, and he viewed it as a hack for us to track it internally, thinking it was better to ask the connection for the transaction state. Over the years we have added more and more state to track, a lot of which is impossible to ask the connection for. So it seems that this is just a relic of the passed and we will just track the state internally only.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 14 9月, 2012 1 次提交
-
-
由 Dan McClain 提交于
Having column related schema dumper code in the AbstractAdapter. The code remains the same, but by placing it in the AbstractAdapter, we can then overwrite it with Adapter specific methods that will help with Adapter specific data types. The goal of moving this code here is to create a new migration key for PostgreSQL's array type. Since any datatype can be an array, the goal is to have ':array => true' as a migration option, turning the datatype into an array. I've implemented this in postgres_ext, the syntax is shown here: https://github.com/dockyard/postgres_ext#arrays Adds array migration support Adds array_test.rb outlining the test cases for array data type Adds pg_array_parser to Gemfile for testing Adds pg_array_parser to postgresql_adapter (unused in this commit) Adds schema dump support for arrays Adds postgres array type casting support Updates changelog, adds note for inet and cidr support, which I forgot to add before Removing debugger, Adds pg_array_parser to JRuby platform Removes pg_array_parser requirement, creates ArrayParser module used by PostgreSQLAdapter
-
- 13 9月, 2012 1 次提交
-
-
由 Matt Jones 提交于
-