aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* `ActiveRecord::Base#becomes` should copy the errorsVokhmin Alexey V2015-12-144-2/+43
|
* 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
* | | | Merge pull request #22511 from jonatack/redirect-to-302Arthur Nogueira Neves2015-12-112-17/+36
|\ \ \ \ | | | | | | | | | | Show redirect response code in assert_response messages
| * | | | Show redirect response code in assert_response messagesJon Atack2015-12-112-17/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to PR #19977, which helpfully added the redirection path to the error message of assert_response if response is a redirection, but which removed the response code, obscuring the type of redirect. This PR: - brings back the response code in the error message, - updates the tests so the new messages can be tested, - and adds test cases for the change.
* | | | | Revert "Merge pull request #22502 from maclover7/remove-deprecation-notice"Arthur Neves2015-12-111-0/+8
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c2e70ca9b042a3461aac0dc073a80e84bd77eb57, reversing changes made to b0e5fc2737ed0b2f67f9b9538d01e084545493fd. this broke the build
* | | | Merge pull request #22502 from maclover7/remove-deprecation-noticeArthur Nogueira Neves2015-12-111-8/+0
|\ \ \ \ | | | | | | | | | | Remove unused deprecation notice
| * | | | Remove unused deprecation noticeJon Moss2015-12-051-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The `rake db:test:*` tasks were deprecated in #13528, but were undeprecated and added back in via #17739.
* | | | | Merge pull request #22514 from ↵Rafael França2015-12-112-3/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | prathamesh-sonpatki/use-assert-over-assert-predicate Use assert over assert_predicate in assert_response
| * | | | | Use assert over assert_predicate in assert_responsePrathamesh Sonpatki2015-12-062-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `assert_predicate` appends its own error message at the end of message generated by `assert_response` and because of that the error message displays the whole `response` object. - For eg. Expected response to be a <success>, but was a redirect to <http://test.host/posts>. Expected #<ActionDispatch::TestResponse:0x007fb1cc1cf6f8....(lambda)>}>> to be successful?. - Complete message can be found here - https://gist.github.com/prathamesh-sonpatki/055afb74b66108e71ded#file-gistfile1-txt-L19. - After this change the message from `assert_predicate` won't be displayed and only message generated by `assert_response` will be shown as follows: Expected response to be a <success>, but was a redirect to <http://test.host/posts>
* | | | | | Merge pull request #22554 from y-yagi/fix_link_to_cocRafael França2015-12-111-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | fix links to code of conduct [ci skip]
| * | | | | | fix links to code of conduct [ci skip]yuuji.yaginuma2015-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | CoC text has been moved to the Rails website in 90bcb6d
* | | | | | | Merge pull request #22553 from jtwarren/patch-1Claudio B2015-12-101-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Correct the time comparison for remember_me token
| * | | | | | | Correct the time comparison for remember_me tokenJeffrey Warren2015-12-101-1/+1
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Corrects the time comparison to be `Time.now < time` which allows the user to be set only when the current time is less than the 2 week window given in the example.
* | | | | | | Merge pull request #22552 from tamird/nokogiri-1.6.7Jeremy Daer2015-12-102-5/+5
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Update nokogiri to 1.6.7
| * | | | | | | Update nokogiri to 1.6.7Tamir Duberstein2015-12-102-5/+5
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This picks up https://github.com/sparklemotion/nokogiri/pull/1218 which allows nokogiri to compile on Xcode-only OS X systems.
* | | | | | | Merge pull request #22367 from andreynering/docs-ar-enumsYves Senn2015-12-101-0/+30
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | Adding Enums section to AR Querying. [ci skip]
| * | | | | | Adding Enums section to Active Record Querying Guide. [ci skip]Andrey Nering2015-12-081-0/+25
| | | | | | |
* | | | | | | Merge pull request #22546 from y-yagi/show_relative_path_in_test_runnerYves Senn2015-12-104-23/+63
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | show relative path the rerun snippet of test runner in rails engine
| * | | | | | | show relative path the rerun snippet of test runner in rails engineyuuji.yaginuma2015-12-104-23/+63
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the absolute path is not required to re-run the test, modified so that unnecessary information is not displayed. ```ruby # before bin/rails test /path/to/blorgh/test/integration/navigation_test.rb:5 # after bin/rails test test/integration/navigation_test.rb:5 ```
* | | | | | | Merge pull request #22543 from datanoise/masterRafael França2015-12-091-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fixed typo in mysql client parameter
| * | | | | | | Fixed typo in mysql client parameterKent Sibilev2015-12-091-1/+1
|/ / / / / / /