aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | Merge pull request #25395 from ↵Rafael França2016-11-246-22/+86
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | yawboakye/use_gen_random_uuid_from_pgcrypto_extension For PostgreSQL >= 9.4 use `gen_random_uuid()`
| * | | | | | | For `PostgreSQL >= 9.4` use `gen_random_uuid()`Yaw Boakye2016-11-226-22/+86
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 9.4, PostgreSQL recommends using `pgcrypto`'s `gen_random_uuid()` to generate version 4 UUIDs instead of the functions in the `uuid-ossp` extension. These changes uses the appropriate UUID function depending on the underlying PostgreSQL server's version, while maintaining `uuid_generate_v4()` in older migrations.
* | | | | | | [ci skip] Add changelog entry for 86754a8fKasper Timm Hansen2016-11-231-0/+11
| | | | | | |
* | | | | | | [ci skip] Explain only :json is shipped by default.Kasper Timm Hansen2016-11-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't want to add defensive programming to this fairly simple thing. Fixes #27060.
* | | | | | | Use accept header instead of mangling request path.Kasper Timm Hansen2016-11-233-24/+44
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of appending a format to the request, it's much better to just pass a more appropriate accept header. Rails will figure out the format from that instead. This allows devs to use `:as` on routes that don't have a format. Introduce an `IdentityEncoder` to avoid `if request_encoder`, essentially a better version of the purpose of the `WWWFormEncoder`. One that makes conceptual sense on GET requests too. Fixes #27144.
* | | | | | Merge pull request #27113 from rails/remove-jqueryGuillermo Iguaran2016-11-228-18/+34
|\ \ \ \ \ \ | | | | | | | | | | | | | | Drop jQuery as a dependency
| * | | | | | Add rails-ujs as dependency in the rails GemfileGuillermo Iguaran2016-11-212-0/+9
| | | | | | |
| * | | | | | Add CHANGELOG entryGuillermo Iguaran2016-11-211-0/+5
| | | | | | |
| * | | | | | Don't add jQuery by default in new apps and use rails-ujs as UJS adapter insteadGuillermo Iguaran2016-11-215-18/+20
| | |_|_|/ / | |/| | | |
* | | | | | Merge pull request #27133 from rails/reload_singular_associationsYves Senn2016-11-225-1/+51
|\ \ \ \ \ \ | | | | | | | | | | | | | | Introduce `reload_<association>` reader for singular associations.
| * | | | | | Introduce `reload_<association>` reader for singular associations.Yves Senn2016-11-225-1/+51
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch brings back the functionality of passing true to the association proxy. The behavior was deprecated with #20888 and scheduled for removal in Rails 5.1. The deprecation mentioned that instead of `Article.category(true)` one should use `article#reload.category`. Unfortunately the alternative does not expose the same behavior as passing true to the reader did. Specifically reloading the parent record throws unsaved changes and other caches away. Passing true only affected the association. This is problematic and there is no easy workaround. I propose to bring back the old functionality by introducing this new reader method for singular associations.
* | | | | | Merge pull request #27143 from sachin21/fix-permissionMatthew Draper2016-11-221-0/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix a wrong permission
| * | | | | | Fix a wrong permissionSatoshi Ohmori2016-11-221-0/+0
| | | | | | |
* | | | | | | CI against 2.3.3Akira Matsuda2016-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.3.2 has a known regression https://bugs.ruby-lang.org/issues/12920#note-5
* | | | | | | Merge pull request #27139 from ota42y/ota42y/form_helper_typo_fixप्रथमेश Sonpatki2016-11-221-1/+1
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | form_helper typo fix [ci skip]
| * | | | | | form_helper typo fix [ci skip]ota42y2016-11-221-1/+1
|/ / / / / /
* | | | | | Merge pull request #26929 from elorest/is_deep_symbolize_secretsGuillermo Iguaran2016-11-213-2/+22
|\ \ \ \ \ \ | | | | | | | | | | | | | | deep symbolize keys on secrets.yml
| * | | | | | deep symbolize keys on secrets.ymlIsaac Sloan2016-11-213-2/+22
|/ / / / / /
* | | | | | [ci skip] Mention `form_with` and `fields` in changelog.Kasper Timm Hansen2016-11-211-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | Implemented in 67f81cc.
* | | | | | Add form_with to unify form_tag/form_for. (#26976)Kasper Timm Hansen2016-11-212-2/+2475
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add form_with to unify form_tag/form_for. `form_tag` and `form_for` serve very similar use cases. This PR unifies that usage such that `form_with` can output just the opening form tag akin to `form_tag` and can just work with a url, for instance. `form_with` by default doesn't attach class or id to the form — removing them on fields is moved out to a default revisiting PR later. Ported over old tests where applicable to ensure maximum coverage, but left some commented out because they don't yet apply (e.g. `fields_for` later being replaced by `fields`). [ Kasper Timm Hansen & Marek Kirejczyk ] * Add fields DSL method. Strips `_for` and requires models passed as a keyword argument. * Document form_with. Graft the `form_for` docs: rewrite, revise and expand where needed. Also test that a `format` isn't used when an explicit URL is passed. * Enable remote by default. Brand new world! Forms submit via XHRs by default, woah. * Invert `include_id` to `skip_id`. `skip_id: true` reads better than `include_id: false` (since the `include_id` default is true). * Invert `remote` to `local`. Since forms are remote by default, the option name makes more sense as `local: true`. * Invert `enforce_utf8` to `skip_enforcing_utf8`. * Refer to the brand spanking new rails-ujs. Soon to be bundled in Rails proper, so jquery-ujs is out. * Make `form_with` a bit more composed. The flow is still not quite what it should be because the legacy methods and these new ones pull at opposite ends. Lots of options have been renamed, so now the new pieces don't fit in so well. I'll try to work on this in later commits after this PR (it's likely there's a much better way to structure this whole part of Action View).
* | | | | | Merge pull request #27135 from tjai89/patch-1Rafael França2016-11-211-2/+2
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | Update RELEASING_RAILS.md
| * | | | | Update RELEASING_RAILS.mdKirill Zhuravlov2016-11-211-2/+2
|/ / / / / | | | | | | | | | | I have removed the dot because only one string had a dot, all the other strings in the list had no dots
* | | | | update bin/test scripts to prevent double runs.Yves Senn2016-11-217-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The test runner was updated to make use of autorun. This caused the `bin/test` scripts to run Minitest twice.
* | | | | Merge pull request #27123 from javan/actioncable/js-test-updatesKasper Timm Hansen2016-11-215-12/+92
|\ \ \ \ \ | | | | | | | | | | | | Action Cable: JavaScript test updates
| * | | | | Add more Action Cable JavaScript testsJavan Makhmali2016-11-214-0/+78
| | | | | |
| * | | | | Bump Blade and its Sauce Labs plugin to fix tunnel shutdown and related errorJavan Makhmali2016-11-211-12/+14
|/ / / / / | | | | | | | | | | | | | | | https://travis-ci.org/rails/rails/jobs/165766716#L506
* | | | | changelog entry for fc4c15d [ci skip]Yves Senn2016-11-211-0/+5
| | | | | | | | | | | | | | | | | | | | https://github.com/rails/rails/commit/fc4c15d823b112cc440cbd9a4288e1a389c138da
* | | | | `eager_autoload` needs to be triggered for nested constants.Yves Senn2016-11-211-0/+5
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `ActiveRecord::Associations.eager_load!` is called, it eager loads the `Preloader` but does not trigger a `eager_load!` on the `Preloader` itself. A eager loaded component is responsible to forward the `eager_load!` call to nested constants that make use of `eager_autoload` as well. This will also resolve the occasional `NameError` that we've observed in production: ``` NameError: uninitialized constant ActiveRecord::Associations::Preloader::BelongsTo ```
* | | | ✂️ needless lines beneath private.Kasper Timm Hansen2016-11-206-6/+0
| | | |
* | | | Merge pull request #27111 from maclover7/jm-xmlminiKasper Timm Hansen2016-11-209-970/+317
|\ \ \ \ | | | | | | | | | | Refactor ActiveSupport::XMLMini test suite
| * | | | Move tests to a module, include in subclasses, style lintingJon Moss2016-11-201-188/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an error where the test runner would try and run XMLMiniEngineTest like a normal test class, except it's abstract. Now, to circumvent this, we don't include any of the actual tests in XMLMiniEngineTest; they are wrapped in a module that is included in subclass when they inherit from XMLMiniEngineTest. Pretty neat, huh?
| * | | | Create XMLMiniEngineTest; base class for all testsJon Moss2016-11-207-63/+33
| | | | |
| * | | | Code styling cleanupJon Moss2016-11-207-152/+162
| | | | |
| * | | | Create `CommonXMLMiniAdapterTest`; common tests moduleJon Moss2016-11-207-916/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Created a new module (a la Action Cable subscription adapter's test suite) to be included in all sub class test to ensure compatability and reduce duplicated code.
| * | | | Install libxml-ruby gem so full XMLMini test suite can be runJon Moss2016-11-192-0/+3
| | | | |
| * | | | Do not include `ActiveSupport` into test classesJon Moss2016-11-193-33/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Will help get rid of errors like the following: ``` 1) Error: JDOMEngineTest#test_order=: ArgumentError: wrong number of arguments (0 for 1) /Users/jon/code/rails/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb:106:in `test_order=' ```
* | | | | Pass `rails runner` args onto file again.Kasper Timm Hansen2016-11-202-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When making the new command insfrastructure I had missed that `bin/rails runner some_file.rb some args` would pass the extra args onto the file in `ARGV`. Now fixed by allowing the command to take extra args again, and make sure to remove the file name from `ARGV`.
* | | | | Merge pull request #27118 from ↵Kasper Timm Hansen2016-11-202-22/+25
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | prathamesh-sonpatki/correct-prepared-statements-test Fix prepared statements disabled test again
| * | | | | Fix prepared statements disabled test againPrathamesh Sonpatki2016-11-202-22/+25
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Due to `assert_nothing_raised` this test was not really testing anything. - So updated it to assert that the query gives expected result. - Also in general we can use `connection.unprepared_statement` for testing queries w/o prepared statements but it can't be used in this case. This test cases was added because when prepared_statements config is set to false, then DetermineIfPreparableVisitor module does not extended by Arel visitor resulting into an error. Ref: https://github.com/rails/rails/pull/22748. - Because DetermineIfPreparableVisitor module does not get added to the visitor chain only if prepared_statements is false while **setting up connection**, not when `unprepared_statement` is used. - I have also added an assertion for making sure that prepared_config is set to false from the start, so that nobody accidentally removes the connection setup using `arunit_without_prepared_statements` and replaces it with stubs or unprepared_statement.
* | | | | Merge pull request #27117 from kirs/activemodel-testing-implementationGuillermo Iguaran2016-11-191-3/+3
|\ \ \ \ \ | | | | | | | | | | | | Do not rely on Ruby implementation in AM test
| * | | | | Do not rely on Ruby implementation in AM testKir Shatrov2016-11-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now a few tests in ActiveModel rely on Ruby implementation and the fact that in MRI `97.18` as a float is greater than `97.18` as a BigDecimal. This is only relevant for MRI. On JRuby, comparing float to BigDecimal would be conversion of them to the same type and they will be equal. I'd like the ActiveModel test suite to be Ruby implementation-agnostic. Here we test ActiveModel, not the Ruby internals. This PR fixes a couple more JRuby tests.
* | | | | | Use existing --skip-turbolinks option for conditionals instead of checking ↵Guillermo Iguaran2016-11-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | if turbolinks is present in gemfile list
* | | | | | Merge pull request #27116 from maclover7/jm-actionview-docsJon Moss2016-11-191-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Change html-scanner to rails-html-sanitizer
| * | | | | | Change html-scanner to rails-html-sanitizerJon Moss2016-11-191-1/+1
| | |/ / / / | |/| | | | | | | | | | | | | | | | [ci skip]
* | | | | | Merge pull request #27115 from rails/revert-27114-fix_typoJon Moss2016-11-191-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Revert "fix typo in `match` doc [ci skip]"
| * | | | | | Revert "fix typo in `match` doc [ci skip]"Jon Moss2016-11-191-1/+1
|/ / / / / /
* | | | | | Merge pull request #27114 from y-yagi/fix_typoGuillermo Iguaran2016-11-191-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | fix typo in `match` doc [ci skip]
| * | | | | | fix typo in `match` doc [ci skip]yuuji.yaginuma2016-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | s/Constrains/Constraints
* | | | | | | Merge pull request #27112 from kamipo/follow-up-27109Kasper Timm Hansen2016-11-192-2/+2
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Fix typo s/with/without/
| * | | | | | Fix typo s/with/without/Ryuta Kamizono2016-11-202-2/+2
|/ / / / / / | | | | | | | | | | | | | | | | | | Follow up to #27109.