aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Add missing release notes entry for ↵Prathamesh Sonpatki2017-01-091-0/+3
| | | | | | | | | | | | | | | | https://github.com/rails/rails/commit/f02a35b86efea24f1e2ab684bc8081ced5eb3b1a [ci skip]
* | | | Merge pull request #27628 from y-yagi/revert_27619Kasper Timm Hansen2017-01-101-5/+0
|\ \ \ \ | | | | | | | | | | Revert "Merge pull request #27619 from dixpac/add_missing_generator_test
| * | | | Revert "Merge pull request #27619 from dixpac/add_missing_generator_test"yuuji.yaginuma2017-01-101-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8cb3cdffdb70f3575518d24ea96ec891e40d21d0, reversing changes made to 3bc747bd8676dc940b531067e2861dcd4ac28efc. Reason: This test already exists in `SharedGeneratorTests`. Ref: https://github.com/rails/rails/blob/master/railties/test/generators/shared_generator_tests.rb#L109..L112 https://github.com/rails/rails/blob/master/railties/test/generators/app_generator_test.rb#L55..L56
* | | | | Merge pull request #27616 from jnicklas/time-travel-with-subclassesAndrew White2017-01-102-5/+24
|\ \ \ \ \ | | | | | | | | | | | | Make time travel work with subclasses of Time/Date/Datetime
| * | | | | Make time travel work with subclasses of Time/Date/DatetimeJonas Nicklas2017-01-102-5/+24
| | |/ / / | |/| | | | | | | | | | | | | | | | | | Closes #27614 Previously when calling `now` on a subclass of e.g. `Time` it would return an instance of `Time` instead of returning an instance of the subclass. This way, we always return the correct class.
* | | | | oops! :scream_cat:Akira Matsuda2017-01-101-1/+1
| | | | |
* | | | | Use temporary connection pool for the tests clearing AR::Base's ↵Akira Matsuda2017-01-101-59/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | active_connections clearing AR::Base's active_connections on the "primary" pool loses connections to the in_memory DB when running sqlite3_mem tests
* | | | | Reconnecting AR::Base's connection breaks sqlite3_mem testsAkira Matsuda2017-01-101-2/+6
| | | | | | | | | | | | | | | | | | | | so let's test with a tiny inner-class model instead
* | | | | sqlite3_mem tests are broken since 79887593c18919fed49f441d64236362cb755872Akira Matsuda2017-01-101-0/+2
| |/ / / |/| | | | | | | | | | | | | | | since 79887593c18919fed49f441d64236362cb755872, create_all task recreates the connection to AR::Base which doesn't connect to the in_memory database that is set up for tests
* | | | Merge pull request #27621 from dylanahsmith/mysql2-nil-connection-testYves Senn2017-01-101-1/+2
|\ \ \ \ | | | | | | | | | | activerecord/test: Fix Mysql2ConnectionTest#test_execute_after_disconnect
| * | | | activerecord/test: Fix Mysql2ConnectionTest#test_execute_after_disconnectDylan Thacker-Smith2017-01-091-1/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mysql2ConnectionTest#test_execute_after_disconnect was originally added to catch a NoMethodError occuring in execute when the Mysql2Adapter has a nil `@connection`. Pull request #26869 removed the error message check in that test because the error message changed in the mysql2 gem, which caused the test to fail. Now the test wouldn't catch the original bug since the NoMethodError would get turned into a ActiveRecord::StatementInvalid exception. Check the cause of the StatementInvalid exception to make sure it is of the correct type.
* | | | Merge pull request #27622 from kamipo/improve_deprecation_messageRafael França2017-01-092-3/+3
|\ \ \ \ | | | | | | | | | | Improve deprecation message for deprecated reflection class name
| * | | | Improve deprecation message for deprecated reflection class nameRyuta Kamizono2017-01-101-1/+1
| | | | |
| * | | | Suppress deprecation message to `has_and_belongs_to_many` only onceRyuta Kamizono2017-01-101-2/+2
| |/ / / | | | | | | | | | | | | | | | | Passing a class to `has_and_belongs_to_many` show deprecation message three times. It is enough only once.
* | | | Merge pull request #27619 from dixpac/add_missing_generator_testGuillermo Iguaran2017-01-091-0/+5
|\ \ \ \ | |/ / / |/| | | Test `--skip-git` generator option
| * | | Test `--skip-git` generator optiondixpac2017-01-091-0/+5
| | | |
* | | | Merge pull request #27551 from kirs/deprecate-class-name-as-classKasper Timm Hansen2017-01-095-3/+27
|\ \ \ \ | |/ / / |/| | | Deprecate reflection class name to accept a class
| * | | Deprecate reflection class name to accept a classKir Shatrov2017-01-095-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea of `class_name` as an option of reflection is that passing a string would allow us to lazy autoload the class. Using `belongs_to :client, class_name: Customer` is eagerloading models more than necessary and creating possible circular dependencies.
* | | | Merge pull request #27416 from voray/remove-throw-from-action-cableMatthew Draper2017-01-102-3/+6
|\ \ \ \ | |_|/ / |/| | | ActionCable should not raise when a connection is already open
| * | | ActionCable should not raise when a connection is already openDuncan Grazier2017-01-062-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActionCable was throwing a "Existing connection must be closed before opening" exception which was being picked up as a production issue in our error monitoring software. Since this happens pretty often on any device that allows the browser to sleep (mobile) this error was getting triggered often. This change removes the exception, but keeps logging the occurrence. We now return `false` to let the caller now that `open` failed.
* | | | Merge pull request #25427 from eugeneius/update_increment_documentationKasper Timm Hansen2017-01-082-10/+8
|\ \ \ \ | | | | | | | | | | Update increment! documentation [ci skip]
| * | | | Update increment! documentation [ci skip]Eugene Kenny2016-08-152-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `increment!` and `decrement!` methods were recently reimplemented to make them safe to call from multiple connections concurrently. This changed their behaviour in a few ways. Previously they used `update_attribute`, which calls the attribute setter method, runs callbacks, and touches the record. Now they behave more like `update_column`, writing the update to the database directly and bypassing all of those steps.
* | | | | Merge pull request #27604 from ↵Kasper Timm Hansen2017-01-083-1/+18
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | prathamesh-sonpatki/dont-generate-erb-views-for-api-scaffold-controller Don't generate HTML/ERB templates for scaffold controller with --api flag
| * | | | Don't generate HTML/ERB templates for scaffold controller with --api flagPrathamesh Sonpatki2017-01-073-1/+18
| | | | | | | | | | | | | | | | | | | | - Fixes #27591.
* | | | | Merge pull request #27603 from prathamesh-sonpatki/fix-random-failureSantiago Pastorino2017-01-081-0/+2
|\ \ \ \ \ | | | | | | | | | | | | Fix random failure related to migration environment
| * | | | | Fix random failure related to migration environmentPrathamesh Sonpatki2017-01-071-0/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Reference: https://travis-ci.org/rails/rails/jobs/189764676 - Reproduction command: MTB_VERBOSE=2 bundle exec minitest_bisect --seed 33328 -Itest "test/cases/migration_test.rb" "test/cases/tasks/database_tasks_test.rb" - You need to also add minitest_bisect gem to the Gemfile to reproduce this failure.
* | | | | Merge pull request #27602 from prathamesh-sonpatki/followup-27596Santiago Pastorino2017-01-081-1/+8
|\ \ \ \ \ | | | | | | | | | | | | Followup of #27596, test output of "run" method as well
| * | | | | Followup of #27596, test output of "run" method as wellPrathamesh Sonpatki2017-01-071-1/+8
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | - #27596 Updated "run" and "migrate" method for returning correct value but only added test for "migrate" method. This commit adds a test for "run" as well.
* | | | | Merge pull request #27598 from ↵Sean Griffin2017-01-072-1/+18
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | NickLaMuro/fix-deep-nesting-where-clauses-with-joins Fix bug with symbolized keys in .where with nested join
| * | | | Adds .to_s to table_name callNick LaMuro2017-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | Avoids a NoMethodError when table_name is a symbol instead of a string.
| * | | | Add failing test for where with joinsNick LaMuro2017-01-061-0/+17
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will cause a failure with the changes from 8e2e5f9: https://github.com/rails/rails/commit/8e2e5f9e3d1f434e265dc104ea9b00ff75702fc3 With the `singularize` call that is being done in that method when there is multiple nestings of associations (JOIN calling a JOIN) and the `stringify_keys!` is only called once here: https://github.com/rails/rails/blob/21e5fd4/activerecord/lib/active_record/relation/where_clause_factory.rb#L16 And not in the subsequent recursion in `.predicate_builder`
* | | | Merge pull request #27596 from schneems/schneems/migrator-resultRichard Schneeman2017-01-062-2/+18
|\ \ \ \ | |/ / / |/| | | Preserve `up` and `down` return type
| * | | Preserve `up` and `down` return typeschneems2017-01-062-2/+18
|/ / / | | | | | | | | | | | | | | | In Rails 4.2 calling `ActiveRecord::Migrator.migrate` would return an array of results. Without realizing that this return type was expected I accidentally introduced a change in https://github.com/rails/rails/commit/4d60e93174a3d6d90b1a06fc7515cb5cd749a6f3 This PR preserves the previous behavior and adds a test on the return type. This will need a backport to 5.0 branch.
* | | Merge pull request #27392 from y-yagi/use_same_class_on_compactSean Griffin2017-01-062-0/+14
|\ \ \ | | | | | | | | ensure `#compact` of HWIDA to return HWIDA
| * | | ensure `#compact` of HWIDA to return HWIDAyuuji.yaginuma2017-01-062-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Hash#compact` of Ruby native returns new hash. Therefore, in order to return HWIDA as in the past version, need to define own `#compact` to HWIDA. Related: #26868
* | | | Merge pull request #27227 from MQuy/allow-custom-content-type-in-mail-bodyRafael Mendonça França2017-01-063-4/+38
|\ \ \ \ | | | | | | | | | | | | | | | Allow to custom content type when setting mailer body
| * | | | Remove unnecessary condition in content_typeMQuy2017-01-061-1/+1
| | | | |
| * | | | Add document in mailerMQuy2016-12-061-0/+13
| | | | |
| * | | | Fix wrong typo in testMQuy2016-12-051-1/+1
| | | | |
| * | | | Add changelog for custom content typeMQuy2016-12-012-0/+16
| | | | |
| * | | | allow context type when set body mailMQuy2016-11-302-4/+13
| | | | |
* | | | | Remove unneeded Deprecation silenceRafael Mendonça França2017-01-061-5/+3
| | | | |
* | | | | Merge pull request #27294 from eavgerinos/doc-ar-callbacks-orderRafael França2017-01-061-0/+49
|\ \ \ \ \ | | | | | | | | | | | | [documentation] ActiveRecord: Document order of Callbacks
| * | | | | [ci skip] ActiveRecord: Document order of CallbacksAggelos Avgerinos2016-12-221-0/+49
| | | | | |
* | | | | | Merge pull request #27586 from maclover7/jm-fix-27584Rafael França2017-01-062-3/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | Update `cookies` helper on all HTTP requests
| * | | | | | Update `cookies` helper on all HTTP requestsJon Moss2017-01-052-3/+11
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression introduced by ae29142142324545a328948e059e8b8118fd7a33 / 8363b879fe759f0645179f4521cc64795efbee6e. Previously, cookies were only updated on `GET` requests. Now we will update the helper for all requests, as part of `process`. Added regression tests for all available HTTP method helpers in `ActionController::TestCase`.
* | | | | | Privatize unneededly protected methods in Active RecordAkira Matsuda2017-01-055-16/+12
| | | | | |
* | | | | | `self.` is not needed when calling its own instance methodAkira Matsuda2017-01-0560-71/+71
| | | | | | | | | | | | | | | | | | | | | | | | Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
* | | | | | CI against jruby-9.1.6.0Akira Matsuda2017-01-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | And let's see if it still fails...
* | | | | | This method is never called since 8e633e505880755e7e366ccec2210bbe2b5436e7Akira Matsuda2017-01-051-7/+0
| | | | | |