aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Internal test migrations use the private 'Current' versionMatthew Draper2015-12-1540-64/+64
| | | | | | | | Apart from specific versioning support, our tests should focus on the behaviour of whatever version they're accompanying, regardless of when they were written. Application code should *not* do this.
* Ensure generated migrations include a version numberMatthew Draper2015-12-153-14/+14
|
* Use a deliberately-invalid migration version in all doc examplesMatthew Draper2015-12-159-54/+54
| | | | | | | | | | If we use a real version, at best that'll be an onerous update required for each release; at worst, it will encourage users to write new migrations against an older version than they're using. The other option would be to leave these bare, without any version specifier. But as that's just a variant spelling of "4.2", it would seem to raise the same concerns as above.
* Add migration versioning via Migration subclassesMatthew Draper2015-12-155-2/+64
|
* Ensure uuid-ossp extension is present before we rely on itMatthew Draper2015-12-151-0/+2
|
* Fix travis matrixRafael Mendonça França2015-12-141-1/+1
|
* Add ruby-head back in the allow failures groupRafael Mendonça França2015-12-141-0/+1
| | | | Travis still don't have a updated version
* Do now allow failures with Ruby 2.3 anymoreRafael Mendonça França2015-12-141-2/+0
|
* Test with Ruby 2.3.0Rafael Mendonça França2015-12-141-0/+1
|
* Merge pull request #22564 from maximeg/legit_name_errorsSean Griffin2015-12-142-2/+45
|\ | | | | Don't catch all NameError to reraise as ActionController::RoutingError
| * Don't catch all NameError to reraise as ActionController::RoutingError #22368Maxime Garcia2015-12-122-2/+45
| |
* | Revert "Perform a more efficient query in `Relation#any?`"Sean Griffin2015-12-143-8/+15
| | | | | | | | | | | | | | | | | | This reverts commit 6d5b1fdf55611de2a1071c37544933bb588ae88e. `eager_load` and `references` can include hashes, which won't match up with `references` A test case has been added to demonstrate the problem
* | Merge pull request #22561 from Cleggameg/patch-2Rafael Mendonça França2015-12-141-2/+2
|\ \ | | | | | | | | | Update seeds.rb.tt
| * | Update seeds.rb.ttPaul Clegg2015-12-141-2/+2
|/ / | | | | | | Rahm Emanuel doesn't deserve to be in Rails.
* | Merge pull request #22395 from avokhmin/becomes-errors-base-2Sean Griffin2015-12-144-2/+43
|\ \ | | | | | | `ActiveRecord::Base#becomes` should copy the errors
| * | `ActiveRecord::Base#becomes` should copy the errorsVokhmin Alexey V2015-12-144-2/+43
| | |
* | | Perform a more efficient query in `Relation#any?`Sean Griffin2015-12-142-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was changed in 421c81b, as `exists?` blows up if you are eager loading a polymorphic association, as it'll try to construct a join to that table. The previous change decided to execute a `count` instead, which wouldn't join. Of course, the only time we actually need to perform a join on the eager loaded values (which would perform a left outer join) is if they're being referenced in the where clause. This doesn't affect inner joins.
* | | Merge pull request #22582 from sikachu/hwia-to_hKasper Timm Hansen2015-12-142-9/+11
|\ \ \ | | | | | | | | Make Parameters#to_h and #to_unsafe_h return HWIA
| * | | Make Parameters#to_h and #to_unsafe_h return HWIAPrem Sichanugrist2015-12-142-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes these two methods to be more inline with the previous behavior of Parameters as Parameters used to be inherited from HWIA. Fixes #21391
* | | | Fix test failures caused by 574f255Sean Griffin2015-12-141-1/+1
| |/ / |/| | | | | | | | | | | There was a test remaining for PG only that was checking for an exact limit clause
* | | Use a bind param for `LIMIT` and `OFFSET`Sean Griffin2015-12-145-13/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently generate an unbounded number of prepared statements when `limit` or `offset` are called with a dynamic argument. This changes `LIMIT` and `OFFSET` to use bind params, eliminating the problem. `Type::Value#hash` needed to be implemented, as it turns out we busted the query cache if the type object used wasn't exactly the same object. This drops support for passing an `Arel::Nodes::SqlLiteral` to `limit`. Doing this relied on AR internals, and was never officially supported usage. Fixes #22250.
* | | Deprecate limit strings with commasSean Griffin2015-12-142-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some backends allow `LIMIT 1,2` as a shorthand for `LIMIT 1 OFFSET 2`. Supporting this in Active Record massively complicates using bind parameters for limit and offset, and it's trivially easy to build an invalid SQL query by also calling `offset` on the same `Relation`. This is a niche syntax that is only supported by a few adapters, and can be trivially worked around by calling offset explicitly.
* | | Merge pull request #22463 from tjblonsk/add_bug_report_to_contributing_mdSean Griffin2015-12-141-7/+33
|\ \ \ | | | | | | | | Add specific bug reporting guidelines to contributing.md [ci skip]
| * | | Add specific bug reporting guidelines to contributing.md. [ci skip]Tim2015-12-111-7/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add boldface and bullets to make more readable. Make sentences declarative. Remove "you"s.
* | | | Merge pull request #22209 from ↵Sean Griffin2015-12-142-0/+19
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | yui-knk/add_test_sanitize_sql_array_handles_named_bind_variables Add test cases for `#sanitize_sql_array` with named_bind_variables
| * | | Add test cases for `#sanitize_sql_array` with named_bind_variablesyui-knk2015-11-092-0/+19
| | | | | | | | | | | | | | | | | | | | And add code examples to `sanitize_sql_for_conditions`, `sanitize_sql_for_assignment`, and `sanitize_sql_array`.
* | | | Revert "Merge pull request #22569 from seuros/remove-test-case"eileencodes2015-12-139-31/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9712a7a12b7f9e4dcef751ceda8a73c3f4beb11f, reversing changes made to 3e65c3d3886336e9145438cdeacaf4ebec6a48b8. Reverting because this caused test failures and while we have a followup branch there is still one failure that happens randomly and isn't straight forward to fix.
* | | | Merge pull request #22571 from mtsmfm/travel-backSantiago Pastorino2015-12-131-3/+3
|\ \ \ \ | | | | | | | | | | travel back
| * | | | travel backFumiaki MATSUSHIMA2015-12-131-3/+3
| | | | |
* | | | | Merge pull request #22569 from seuros/remove-test-caseEileen M. Uchitelle2015-12-139-30/+31
|\ \ \ \ \ | | | | | | | | | | | | Controller generators should be creating IntegrationTest stubs instea…
| * | | | | Controller generators should be creating IntegrationTest stubs instead of ↵Abdelkader Boudih2015-12-139-30/+31
| |/ / / / | | | | | | | | | | | | | | | ControllerTest
* | | | | Merge branch 'rails-rake-proxy'Kasper Timm Hansen2015-12-134-11/+63
|\ \ \ \ \
| * | | | | Implement Rake proxy for Rails' command line interface.Dharam Gollapudi2015-12-134-6/+64
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows any Rake task to be run through `bin/rails` such as `bin/rails db:migrate`, `bin/rails notes` etc. The Rake tasks are appended to Rails' help output, and blend in as standard commands.
* | | | | Merge pull request #22574 from gsamokovarov/scaffold-500Kasper Timm Hansen2015-12-133-3/+3
|\ \ \ \ \ | | | | | | | | | | | | Prevent a 500 in the default controller scaffold
| * | | | | Prevent a 500 in the default controller scaffoldGenadi Samokovarov2015-12-133-3/+3
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you update a record with no attributes, you'll hit a 500 from a guard in `assign_attributes` raising: ```ruby ArgumentError: When assigning attributes, you must pass a hash as an argument. app/controllers/users_controller.rb:44:in `block in update' app/controllers/users_controller.rb:43:in `update' test/controllers/users_controller_test.rb:37:in `block in <class:UsersControllerTest>' ``` Not a biggie, but may be quite confusing for the folks new to the framework.
* | | | | Merge pull request #22573 from gsamokovarov/web-console-3-0Kasper Timm Hansen2015-12-132-3/+3
|\ \ \ \ \ | | | | | | | | | | | | Update web-console to 3.0.0
| * | | | | Update web-console to 3.0.0Genadi Samokovarov2015-12-132-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Web Console 3.0.0 is compatible with Rails 5, while the 2.x.x releases aren't.
* | | | | | Nodoc Rails command.Kasper Timm Hansen2015-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API isn't ready yet, which means we haven't documented it. People can't make their own commands, so there's no reason to show it in generated documentation.
* | | | | | Merge pull request #22572 from prathamesh-sonpatki/fix-paintit-method-in-guidesArthur Nogueira Neves2015-12-131-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix paintIt method in JavaScript guides [ci skip]
| * | | | | | Fix paintIt method in JavaScript guides [ci skip]Prathamesh Sonpatki2015-12-131-2/+2
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Changed "paintIt" to "@paintIt" so that it can be called in an on click handler. - Closes #22568
* | | | | | lazy load listen in coreXavier Noria2015-12-132-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | See the rationale in the comment present in this patch.
* | | | | | let config.file_watcher be the way to enable the evented file watcherXavier Noria2015-12-136-31/+31
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, the sole presence of the Listen constant enabled the evented file watcher (unless listen resorted to the polling backend). This way, applications may depend on listen for other stuff independently of this feature. Also, allows teams with mixed setups to decide at boot time whether the evented watcher should be enabled for each particular instance.
* | | | | [ci skip] Fix articles spelling.Kasper Timm Hansen2015-12-131-1/+1
| | | | | | | | | | | | | | | Tiny typo in the testing guide; articules should be articles.
* | | | | Merge pull request #22381 from yahonda/use_adapter_subsecond_precision_supportedAaron Patterson2015-12-135-61/+22
|\ \ \ \ \ | |_|/ / / |/| | | | Use adapter supports_datetime_with_precision
| * | | | Consolidate tests for time and datetime columns options, limit and precisionYasuo Honda2015-11-302-59/+12
| | | | |
| * | | | Avoid dummy_time_value to add "2000-01-01" twiceYasuo Honda2015-11-301-1/+5
| | | | |
| * | | | Support supports_datetime_with_precision? for sqlite3Yasuo Honda2015-11-301-0/+4
| | | | |
| * | | | Use adapter supports_datetime_with_precision to support 3rd party adapter testsYasuo Honda2015-11-301-1/+1
| | | | |
* | | | | Fix spacing on CHANGELOG nameeileencodes2015-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | So that it appears correctly in the CHANGELOG on github.
* | | | | Remove ActionController::TestCase from documentationeileencodes2015-12-126-35/+51
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Rails 5.1 `ActionController::TestCase` will be moved out of Rails into it's own gem. Please use `ActionDispatch::IntegrationTest` going foward. Because this will be moved to a gem I used `# :stopdoc:` instead of deleting the documentation. This will remove it from the Rails documentation but still leave the method documented for when we move it to a gem. Guides have been updated to use the routing structure used in Integration and all test examples have been updated to inherit from `ActionDispatch::IntegrationTest` instead of `ActionController::TestCase. Fixes #22496