aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | Merge pull request #21522 from tgxworld/scope_perfRafael Mendonça França2015-09-074-5/+13
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | PERF: Scope performance.
| * | | | | | | | | Cache check if `default_scope` has been overridden.Guo Xiang Tan2015-09-071-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benchmark Script: ``` begin require 'bundler/inline' rescue LoadError => e $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' raise e end gemfile(true) do source 'https://rubygems.org' # gem 'rails', github: 'rails/rails', ref: 'f1f0a3f8d99aef8aacfa81ceac3880dcac03ca06' gem 'rails', path: '~/rails' gem 'arel', github: 'rails/arel', branch: 'master' gem 'rack', github: 'rack/rack', branch: 'master' gem 'sass' gem 'sprockets-rails', github: 'rails/sprockets-rails', branch: 'master' gem 'sprockets', github: 'rails/sprockets', branch: 'master' gem 'pg' gem 'benchmark-ips' end require 'active_record' require 'benchmark/ips' ActiveRecord::Base.establish_connection('postgres://postgres@localhost:5432/rubybench') ActiveRecord::Migration.verbose = false ActiveRecord::Schema.define do create_table :users, force: true do |t| t.string :name, :email t.timestamps null: false end end class User < ActiveRecord::Base; end attributes = { name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", email: "foobar@email.com", } 1000.times { User.create!(attributes) } Benchmark.ips(5, 3) do |x| x.report('where with hash') { User.where(name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.") } x.report('where with string') { User.where("users.name = ?", "Lorem ipsum dolor sit amet, consectetur adipiscing elit.") } x.compare! end key = if RUBY_VERSION < '2.2' :total_allocated_object else :total_allocated_objects end before = GC.stat[key] User.where(name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.") after = GC.stat[key] puts "Total Allocated Object: #{after - before}" ``` Stackprof output truncated. ``` TOTAL (pct) SAMPLES (pct) FRAME 52 (10.6%) 10 (2.0%) ActiveRecord::Scoping::Default::ClassMethods#build_default_scope ``` Before: ``` Calculating ------------------------------------- where with hash 2.789k i/100ms where with string 4.407k i/100ms ------------------------------------------------- where with hash 29.170k (± 1.9%) i/s - 147.817k where with string 46.954k (± 2.7%) i/s - 237.978k Comparison: where with string: 46954.3 i/s where with hash: 29169.9 i/s - 1.61x slower Total Allocated Object: 85 Calculating ------------------------------------- all 16.773k i/100ms ------------------------------------------------- all 186.102k (± 3.6%) i/s - 939.288k ``` After: ``` Calculating ------------------------------------- where with hash 3.014k i/100ms where with string 4.623k i/100ms ------------------------------------------------- where with hash 31.524k (± 1.3%) i/s - 159.742k where with string 49.948k (± 2.3%) i/s - 249.642k Comparison: where with string: 49948.3 i/s where with hash: 31524.3 i/s - 1.58x slower Total Allocated Object: 84 Calculating ------------------------------------- all 20.139k i/100ms ------------------------------------------------- all 227.860k (± 2.5%) i/s - 1.148M ```
| * | | | | | | | | Reduce calls to stringify_keys.Guo Xiang Tan2015-09-073-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stackprof output truncated. ``` TOTAL (pct) SAMPLES (pct) FRAME 23 (4.7%) 12 (2.4%) Hash#transform_keys 11 (2.2%) 11 (2.2%) block in Hash#transform_keys 30 (6.1%) 7 (1.4%) Hash#stringify_keys ``` Benchmark Script: ``` begin require 'bundler/inline' rescue LoadError => e $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' raise e end gemfile(true) do source 'https://rubygems.org' gem 'rails', path: '~/rails' # master against ref "f1f0a3f8d99aef8aacfa81ceac3880dcac03ca06" gem 'arel', github: 'rails/arel', branch: 'master' gem 'rack', github: 'rack/rack', branch: 'master' gem 'sass' gem 'sprockets-rails', github: 'rails/sprockets-rails', branch: 'master' gem 'sprockets', github: 'rails/sprockets', branch: 'master' gem 'pg' gem 'benchmark-ips' end require 'active_record' require 'benchmark/ips' ActiveRecord::Base.establish_connection('postgres://postgres@localhost:5432/rubybench') ActiveRecord::Migration.verbose = false ActiveRecord::Schema.define do create_table :users, force: true do |t| t.string :name, :email t.timestamps null: false end end class User < ActiveRecord::Base; end attributes = { name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", email: "foobar@email.com", } 1000.times { User.create!(attributes) } Benchmark.ips(5, 3) do |x| x.report('where with hash') { User.where(name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.") } x.report('where with string') { User.where("users.name = ?", "Lorem ipsum dolor sit amet, consectetur adipiscing elit.") } x.compare! end key = if RUBY_VERSION < '2.2' :total_allocated_object else :total_allocated_objects end before = GC.stat[key] User.where(name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.") after = GC.stat[key] puts "Total Allocated Object: #{after - before}" ``` Before: ``` Calculating ------------------------------------- where with hash 2.796k i/100ms where with string 4.338k i/100ms ------------------------------------------------- where with hash 29.177k (± 1.5%) i/s - 148.188k where with string 47.419k (± 2.8%) i/s - 238.590k Comparison: where with string: 47419.0 i/s where with hash: 29176.6 i/s - 1.63x slower Total Allocated Object: 85 ``` After: ``` Calculating ------------------------------------- where with hash 2.895k i/100ms where with string 4.416k i/100ms ------------------------------------------------- where with hash 30.758k (± 2.0%) i/s - 156.330k where with string 47.708k (± 2.6%) i/s - 238.464k Comparison: where with string: 47707.9 i/s where with hash: 30757.7 i/s - 1.55x slower Total Allocated Object: 84 ```
* | | | | | | | | | Correct query for PostgreSQL 8.2Matthew Draper2015-09-082-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generic cast-to-text was only added in 8.3.
* | | | | | | | | | Merge pull request #21523 from tgxworld/improve_perf_allRafael Mendonça França2015-09-071-1/+2
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | PERF: Don't create a Relation when it is not needed.
| * | | | | | | | | | PERF: Don't create a Relation when it is not needed.Guo Xiang Tan2015-09-071-1/+2
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benchmark script used: ``` begin require 'bundler/inline' rescue LoadError => e $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' raise e end gemfile(true) do source 'https://rubygems.org' gem 'rails', path: '~/rails' # master against ref "f1f0a3f8d99aef8aacfa81ceac3880dcac03ca06" gem 'arel', github: 'rails/arel', branch: 'master' gem 'rack', github: 'rack/rack', branch: 'master' gem 'sass' gem 'sprockets-rails', github: 'rails/sprockets-rails', branch: 'master' gem 'sprockets', github: 'rails/sprockets', branch: 'master' gem 'pg' gem 'benchmark-ips' end require 'active_record' require 'benchmark/ips' ActiveRecord::Base.establish_connection('postgres://postgres@localhost:5432/rubybench') ActiveRecord::Migration.verbose = false ActiveRecord::Schema.define do create_table :users, force: true do |t| t.string :name, :email t.timestamps null: false end end class User < ActiveRecord::Base; end attributes = { name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", email: "foobar@email.com", } 1000.times { User.create!(attributes) } Benchmark.ips(5, 3) do |x| x.report('all') { User.all } end key = if RUBY_VERSION < '2.2' :total_allocated_object else :total_allocated_objects end before = GC.stat[key] User.where(name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.") after = GC.stat[key] puts "Total Allocated Object: #{after - before}" ``` Before: ``` Calculating ------------------------------------- all 17.569k i/100ms ------------------------------------------------- all 190.854k (± 3.3%) i/s - 966.295k Total Allocated Object: 85 ``` After: ``` Calculating ------------------------------------- all 22.237k i/100ms ------------------------------------------------- all 262.715k (± 5.5%) i/s - 1.312M Total Allocated Object: 80 ```
* | | | | | | / / / Typo fix [ci skip]amitkumarsuroliya2015-09-071-1/+1
| |_|_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | `lengh` should be `length`
* | | | | | | | | Merge pull request #21527 from rngtng/fix-migrator-path-setupYves Senn2015-09-073-2/+10
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use global migrations_path configuration in Migrator
| * | | | | | | | | Allow global migrations_path configuration with using value from ↵Tobias Bielohlawek2015-09-073-2/+15
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | database_tasks instead of Migrator
* | | | | | | | | changelog, minor formatting changes.Yves Senn2015-09-071-9/+9
| | | | | | | | |
* | | | | | | | | [ci skip] Replace `AR` with `Active Record` in task descyui-knk2015-09-071-1/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many user look `desc` of rake task and they are not familiar with `AR`. `Active Record` is more familiar word.
* | | | | | | | Fix test failures from premature merge of #21317Matthew Draper2015-09-072-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | Merge pull request #21317 from ↵Matthew Draper2015-09-076-9/+30
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | greysteil/support-postgres-drop-index-concurrently Support dropping indexes concurrently in Postgres
| * | | | | | | | Support dropping indexes concurrently in PostgresGrey Baker2015-09-056-9/+30
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See http://www.postgresql.org/docs/9.4/static/sql-dropindex.html for more details.
* / | | | | | | Deprecate passing conditions to AR::Relation destroy_all and delete_all methodsWojciech Wnętrzak2015-09-065-15/+29
|/ / / / / / /
* | | | | | | #where fails if opts.responds_to?(:==) unexpectedlySamuel Williams2015-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | Sometimes opts passed in might respond to ==, e.g. `Arel::Nodes::Grouping`. In this case, `opts == :chain` returns `Arel::Nodes::Equality` which causes odd behaviour. Prefer `if :chain == opts` which guarantees that `Symbol#==` would be invoked. Alternatively consider `eql?`.
* | | | | | | Merge pull request #21412 from yui-knk/feature/irreversible_migration_error_msgYves Senn2015-09-042-2/+77
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | Add detailed error message to `IrreversibleMigration`
| * | | | | | Add detailed error message to `IrreversibleMigration`yui-knk2015-08-301-1/+6
| | | | | | |
| * | | | | | [ci skip] Add comments for `IrreversibleMigration`yui-knk2015-08-291-0/+70
| | | | | | |
| * | | | | | Add detailed error message to `IrreversibleMigration`yui-knk2015-08-281-1/+1
| | | | | | |
| * | | | | | Add detailed error message to `IrreversibleMigration`yui-knk2015-08-281-1/+1
| | | | | | |
* | | | | | | Remove unnecessary require in associations_test.rbakihiro172015-09-031-1/+0
| |_|_|_|/ / |/| | | | |
* | | | | | Don't allocate a bunch of strings in `Relation::Merger`Sean Griffin2015-09-021-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the strings are dynamically computed from a constant, the actual strings we're creating are a known set. We can compute them ahead of time, and reduce the number of allocations in that method.
* | | | | | Respect scale of the column in the Decimal typeRafael Mendonça França2015-09-013-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | [Rafael Mendonça França + Jean Boussier]
* | | | | | No need to get the exception variableRafael Mendonça França2015-09-011-6/+4
| | | | | |
* | | | | | Merge pull request #21318 from yahonda/pr21108Rafael Mendonça França2015-09-012-3/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | Support MySQL 5.7.8 which enables show_compatibility_56=off
| * | | | | | Support MySQL 5.7.8 which enables show_compatibility_56=offYasuo Honda2015-08-212-3/+7
| | | | | | |
* | | | | | | Inline uneccessary frozen string constantSean Griffin2015-08-311-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are only supporting Ruby 2.2 and later in Rails 5, so we do not need an actual constant here. Additionally, referencing a constant actually does a hash lookup (because constants are not constant in Ruby >_>). This will be marginally (likely immeasurable) faster. It is less ugly.
* | | | | | | Merge pull request #21432 from yui-knk/fix/what_change_method_can_reverseSean Griffin2015-08-301-1/+13
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | [ci skip] Update what methods `Migration#change` can reverse
| * | | | | | | [ci skip] Update what methods `Migration#change` can reverseyui-knk2015-08-311-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Documentations and comments about what methods `Migration#change` can reverse is out of date. For example `change_column_default` is now reversible by this [commit](https://github.com/rails/rails/pull/20018). * Comments about `CommandRecorder` dose not match with Rails Guide. For example `add_foreign_key` is listed only on Rails Guide.
* | | | | | | | Merge pull request #21429 from yui-knk/fix/revert_disable_extensionSean Griffin2015-08-302-1/+34
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Make revert of `disable_extension` to work
| * | | | | | | Make revert of `disable_extension` to workyui-knk2015-08-302-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2015-08-302-2/+2
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | |
| * | | | | | | [ci skip] Capitalize commentsyui-knk2015-08-291-1/+1
| | | | | | | |
| * | | | | | | [ci skip] Fix file name generated by `rails generate`yui-knk2015-08-241-1/+1
| | | | | | | |
* | | | | | | | pg, `create_schema`, `drop_schema` and `rename_table` quote schema name.Yves Senn2015-08-284-10/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #21418. Previously schema names were not quoted. This leads to issues when a schema names contains a ".". Methods in `schema_statements.rb` should quote user input.
* | | | | | | | pg docs, `connection.tables` does not use the `name` argument.Yves Senn2015-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Currently the `#tables` method does not make use of the `name` argument and always returns all the tables in the schema search path. However the docs suggest different behavior. While we should porbably adjust the implementation to provide this behavior, let's make the docs right for now (also for `4-2-stable`) and then implement the behavior on `master`.
* | | | | | | | PostgreSQL, add `:if_exists` to `#drop_schema`.Yves Senn2015-08-284-13/+30
| |_|/ / / / / |/| | | | | |
* | | | | | | no more require minitest mockGaurav Sharma2015-08-273-3/+0
| | | | | | |
* | | | | | | Merge pull request #21386 from ronakjangir47/remove_dupsRafael Mendonça França2015-08-264-4/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Removed duplicate requires
| * | | | | | | Removed duplicate require ‘models/computer’Ronak Jangir2015-08-264-4/+0
| | | | | | | |
* | | | | | | | Merge pull request #21336 from yui-knk/refactor/to_use_getterRafael Mendonça França2015-08-261-7/+7
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Use `ActiveRecord::Migration#connection` instead of `@connection`
| * | | | | | | | Use `ActiveRecord::Migration#connection` instead of `@connection`yui-knk2015-08-231-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ActiveRecord::Migration` has `connetion` method so replace to use `connection` method to get `@connection` as much as possible
* | | | | | | | | Fix the unused variable warningakihiro172015-08-261-1/+0
| |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following warning. ```ruby warning: assigned but unused variable - index_definition ```
* | | | | | | | Merge pull request #21377 from ronakjangir47/remove_mocha_active_recordKasper Timm Hansen2015-08-2512-119/+153
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Removed mocha from Active Record Part 1
| * | | | | | | | Removed mocha from Active Record Part 1Ronak Jangir2015-08-2512-119/+153
| | | | | | | | |
* | | | | | | | | Merge pull request #21372 from yui-knk/fix/revert_change_column_defaultSantiago Pastorino2015-08-252-8/+41
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Make `change_column_default` to work
| * | | | | | | | | Make `change_column_default` to workyui-knk2015-08-252-8/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | | remove unused require ‘set’NehaGautam2015-08-251-1/+0
| | | | | | | | | |
* | | | | | | | | | Merge pull request #21074 from ↵Robin Dupret2015-08-251-3/+3
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | vrybas/rdoc-fix-typo-belongs-to-inverse-of-class-name RDoc: fix wrong model name `:inverse_of` with `:belongs_to` [ci skip]