- 28 6月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
```ruby car = Car.create!(name: "Tofaş") # Before car.bulb_ids # => SELECT "bulbs".ID FROM "bulbs" WHERE "bulbs"."name" = $1 AND "bulbs"."car_id" = $2 [["name", "defaulty"], ["car_id", 3]] # After car.bulb_ids # => SELECT "bulbs"."ID" FROM "bulbs" WHERE "bulbs"."name" = $1 AND "bulbs"."car_id" = $2 [["name", "defaulty"], ["car_id", 3]] ```
-
- 25 6月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
Covering #27994 in tests. Closes #27994.
-
- 21 6月, 2017 1 次提交
-
-
由 bogdanvlviv 提交于
`ActiveRecord::Persistence#touch` does not work well when optimistic locking enabled and `locking_column`, without default value, is null in the database.
-
- 16 6月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
`id` column in `subscribers` was added as a primary key for ignorable in INSERT. But it caused `NotNullViolation` for oracle-enhanced adapter. https://github.com/rsim/oracle-enhanced/issues/1357 I changed the column to nullable to address the issue.
-
- 07 6月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
Currently the methods of `AttributeMethods::PrimaryKey` are overwritten by `define_attribute_methods`. It will be broken if a table that customized primary key has non primary key id column. It should not be overwritten if a table has any primary key. Fixes #29350.
-
- 21 4月, 2017 1 次提交
-
-
由 Isaac Betesh 提交于
Fixes #24032
-
- 13 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 09 2月, 2017 1 次提交
-
-
由 namusyaka 提交于
-
- 07 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
Follow up to #26266. The default type of `primary_key` and `references` were changed to `bigint` since #26266. But legacy migration and sqlite3 adapter should keep its previous behavior.
-
- 01 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
Fixes #27666.
-
- 17 1月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
If an adapter does not support foreign key feature, should be noop. https://github.com/rails/rails/blob/v5.0.0.rc1/activerecord/test/cases/migration/foreign_key_test.rb#L288-L294 https://github.com/rails/rails/blob/v5.0.0.rc1/activerecord/test/cases/migration/references_foreign_key_test.rb#L208-L214
-
- 29 12月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
This issue was introduced with d849f42b to solve #19782. However, we can solve #19782 without causing the issue. It is enough to save only when necessary. Fixes #27338.
-
- 21 12月, 2016 1 次提交
-
-
由 Julia Lopez 提交于
-
- 06 12月, 2016 2 次提交
-
-
由 Pavel Pravosud 提交于
-
由 Jon McCartie 提交于
-
- 31 10月, 2016 2 次提交
- 22 10月, 2016 1 次提交
-
-
由 bogdanvlviv 提交于
-
- 10 10月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
```ruby # Before t.index ["firm_id", "type", "rating"], name: "company_index", order: {"rating"=>:desc}, using: :btree # After t.index ["firm_id", "type", "rating"], name: "company_index", order: { rating: :desc }, using: :btree ```
-
- 12 9月, 2016 1 次提交
-
-
由 Yosuke Kabuto 提交于
Make name of attribute medium instead of normal
-
- 16 8月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
-
- 07 8月, 2016 1 次提交
-
-
由 Xavier Noria 提交于
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
-
- 10 7月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
`AssociationQueryHandler` requires `association` initialized `TableMetadata` even if `table_name == arel_table.name`. Fixes #25689.
-
- 07 6月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Fixes #25300.
-
- 25 4月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Example: create_table :users do |t| t.string :name t.index 'lower(name) varchar_pattern_ops' end Fixes #19090. Fixes #21765. Fixes #21819. Fixes #24359. Signed-off-by: NJeremy Daer <jeremydaer@gmail.com>
-
- 06 4月, 2016 1 次提交
-
-
由 Ladislav Smola 提交于
* Fix undefined method `owners' for NullPreloader:Class Fixing undefined method `owners' for ActiveRecord::Associations::Preloader::NullPreloader:Class * Use Ruby 1.9 hash format Use Ruby 1.9 hash format #24192 [Rafael Mendonça França + Ladislav Smola]
-
- 30 3月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 08 3月, 2016 1 次提交
-
-
由 Mehmet Emin İNAÇ 提交于
-
- 20 2月, 2016 1 次提交
-
-
由 Aaron Patterson 提交于
habtm join tables commonly have two id columns and it's OK to make those two id columns a primary key. This commit eliminates the warnings for join tables that have this setup. ManageIQ/manageiq#6713
-
- 31 1月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
For reduce bootstrap queries in tests.
-
- 25 1月, 2016 1 次提交
-
-
由 Vipul A M 提交于
Fixes #23209
-
- 23 1月, 2016 1 次提交
-
-
由 Sean Griffin 提交于
This fixes incorrect assumptions made by e991c7b8 that we can assume the DB is already casting the value for us. The enum type needs additional information to perform casting, and needs a subtype. I've opted not to call `super` in `cast`, as we have a known set of types which we accept there, and the subtype likely doesn't accept them (symbol -> integer doesn't make sense) Close #23190
-
- 15 1月, 2016 1 次提交
-
-
由 Kasper Timm Hansen 提交于
This reverts commit 224eddfc, reversing changes made to 9d681fc7. When merging the pull request, I misunderstood `has_secure_token` as declaring a model has a token from birth and through the rest of its lifetime. Therefore, supporting conditional creation doesn't make sense. You should never mark a model as having a secure token if there's a time when it shouldn't have it on creation.
-
- 10 1月, 2016 1 次提交
-
-
由 Kasper Timm Hansen 提交于
Fix the NoMethodErrors introduced in 224eddfc, when adding conditional token creation. The model declarations but the column wasn't added to the schema.
-
- 02 12月, 2015 1 次提交
-
-
由 Yves Senn 提交于
This solves the following error: ActiveRecord::StatementInvalid: Could not find table 'guitars' It seems that the table structure of the `Guitar` model has not been necessary until now. Due to the wrong table name the model was not correctly linked to the table.
-
- 16 11月, 2015 1 次提交
-
-
由 yui-knk 提交于
If argument of `build_record` has key and value which is same as default value of database, we should also except the key from `create_scope` in `initialize_attributes`. Because at first `build_record` initialize record object with argument of `build_record`, then assign attributes derived from Association's scope. In this case `record.changed` does not include the key, which value is same as default value of database, so we should add the key to except list. Fix #21893.
-
- 27 9月, 2015 1 次提交
-
-
由 eileencodes 提交于
`inverse_of` on through associations was accidently removed/caused to stop working in commit f8d2899d which was part of a refactoring on `ThroughReflection`. To fix we moved `inverse_of` and `check_validity_of_inverse!` to the `AbstractReflection` so it's available to the `ThroughReflection` without having to dup any methods. We then need to delegate `inverse_name` method in `ThroughReflection`. `inverse_name` can't be moved to `AbstractReflection` without moving methods that set the instance variable `@automatic_inverse_of`. This adds a test that ensures that `inverse_of` on a `ThroughReflection` returns the correct class name, and the correct record for the inverse relationship. Fixes #21692
-
- 24 9月, 2015 1 次提交
-
-
由 Jean Boussier 提交于
-
- 23 9月, 2015 2 次提交
-
-
由 Sean Griffin 提交于
And we are passing them as separate types in the query, which means 0 precision is still not supported by older versions of MySQL. I also missed a handful of other cases where they need to be conditionally applied.
-
由 Sean Griffin 提交于
Specifically, versions of MySQL prior to 5.6 do not support this, which is what's used on Travis by default. The method `mysql_56?` appeared to only ever be used to conditionally apply subsecond precision, so I've generalized it and used it more liberally. This should fix the test failures caused by #20317
-