- 20 9月, 2015 3 次提交
-
-
由 Ryuta Kamizono 提交于
Example: create_table :barcodes, primary_key: ["region", "code"] do |t| t.string :region t.integer :code end
-
由 Ryuta Kamizono 提交于
Some test cases are testing only mysql adapter. We should test mysql2 adapter also.
-
由 Ryuta Kamizono 提交于
`@connection` in `StatementPool` is only used for PG adapter. No need for abstract `StatementPool` class.
-
- 18 9月, 2015 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 17 9月, 2015 1 次提交
-
-
由 Ronak Jangir 提交于
-
- 12 9月, 2015 1 次提交
-
-
由 Ronak Jangir 提交于
`restrict_with_error` message will now respect owner’s human name in any locale [kuboon & Ronak Jangir]
-
- 09 9月, 2015 2 次提交
-
-
由 Rafael Mendonça França 提交于
This reverts commit d5ba9a42, reversing changes made to 30c50339. Reason: This generate the dynalic finders more than one time
- 08 9月, 2015 3 次提交
-
-
由 yui-knk 提交于
Basically view tests for MySQL are same with `test/cases/adapters/postgresql/view_test.rb`. So move `test/cases/adapters/postgresql/view_test.rb` to `test/cases/view_test.rb` and make them only run if `current_adapter` supports writable view.
-
由 Dmitry Polushkin 提交于
Example: ```ruby class Person include ActiveModel::Validations attr_reader :name, :title validates_presence_of :name, on: :create validates_presence_of :title, on: :update end person = Person.new person.valid?([:create, :update]) # => true person.errors.messages # => {:name=>["can't be blank"], :title=>["can't be blank"]} ```
-
由 Rafael Mendonça França 提交于
This reverts commit 51dd2588, reversing changes made to ecb4e4b2. This broke Active Record tests
-
- 07 9月, 2015 3 次提交
-
-
由 amitkumarsuroliya 提交于
`lengh` should be `length`
-
由 Tobias Bielohlawek 提交于
-
由 Pavel Pravosud 提交于
This change allows to instantiate all ActiveRecordError descendant execption classes without arguments, which might be useful in testing and is far less surprising than mandatory arguments.
-
- 06 9月, 2015 3 次提交
-
-
由 Matthew Draper 提交于
Apparently I managed to forget how similar the "tests passing" and "no status reported" merge indicators look. Note that the previous `stubs` in test_add_index wasn't working: the method was still called, and just happened to return false.
-
由 Wojciech Wnętrzak 提交于
-
由 Grey Baker 提交于
See http://www.postgresql.org/docs/9.4/static/sql-dropindex.html for more details.
-
- 03 9月, 2015 2 次提交
-
-
由 Bogdan Gusiev 提交于
Current implementation has a lot of utility methods that accept reflection call a lot of methods on it and exit. E.g. has_counter_cache?(reflection) It causes confusion and inability to cache result of the method even through it always returns the same result for the same reflection object. It can be done easier without access to the association context by moving code into reflection itself. e.g. reflection.has_counter_cache? Reflection is less complex object than association so moving code there automatically makes it simplier to understand.
-
由 akihiro17 提交于
-
- 02 9月, 2015 1 次提交
-
-
由 Rafael Mendonça França 提交于
[Rafael Mendonça França + Jean Boussier]
-
- 30 8月, 2015 1 次提交
-
-
由 yui-knk 提交于
This is fix of #11826 which miss to add `disable_extension` to `ReversibleAndIrreversibleMethods`. So `CommandRecorder#method_missing` catches `change_column_default` and @delegate's method is called.
-
- 28 8月, 2015 2 次提交
- 27 8月, 2015 2 次提交
-
-
由 Gaurav Sharma 提交于
-
由 Ronak Jangir 提交于
-
- 26 8月, 2015 2 次提交
-
-
由 akihiro17 提交于
This fixes the following warning. ```ruby warning: assigned but unused variable - index_definition ```
-
由 Ronak Jangir 提交于
-
- 25 8月, 2015 1 次提交
-
-
由 yui-knk 提交于
This is fix of #20018 which removes `change_column_default` from array, so `CommandRecorder#method_missing` catches `change_column_default` and @delegate's method is called. This PR * fix this bug * define `ReversibleAndIrreversibleMethods` const making clear which this array means to prevent these miss
-
- 24 8月, 2015 3 次提交
-
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
由 Agis- 提交于
Since after 87d1aba3 `dependent: :destroy` callbacks on has_one assocations run *after* destroy, it is possible that a nullification is attempted on an already destroyed target: class Car < ActiveRecord::Base has_one :engine, dependent: :nullify end class Engine < ActiveRecord::Base belongs_to :car, dependent: :destroy end > car = Car.create! > engine = Engine.create!(car: car) > engine.destroy! # => ActiveRecord::ActiveRecordError: cannot update a > destroyed record In the above case, `engine.destroy!` deletes `engine` and *then* triggers the deletion of `car`, which in turn triggers a nullification of `engine.car_id`. However, `engine` is already destroyed at that point. Fixes #21223.
-
- 23 8月, 2015 2 次提交
- 20 8月, 2015 1 次提交
-
-
由 Yves Senn 提交于
Closes #21304. While we can validate uniqueness for record without primary key on creation, there is no way to exclude the current record when updating. (The update itself will need a primary key to work correctly).
-
- 18 8月, 2015 2 次提交
-
-
由 Ryuta Kamizono 提交于
As of MySQL 5.7.8, MySQL supports a native JSON data type. Example: create_table :json_data_type do |t| t.json :settings end
-
由 prakash 提交于
-
- 13 8月, 2015 3 次提交
-
-
由 Yves Senn 提交于
Closes #21201.
-
由 Yves Senn 提交于
As described in the "Follow Coding Conventions" section in our contribution guide (http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions) we favor `assert_not` over `refute`. While we don't usually make stylistic changes on it's own I opted to do it in this case. The reason being that test cases are usually copied as a starting point for new tests. This results in a spread of `refute` in files that have been using it already.
-
由 Rafael Mendonça França 提交于
If the through class has default scopes we should skip the statement cache. Closes #20745.
-
- 08 8月, 2015 1 次提交
-
-
由 Matt Hanlon 提交于
-