aboutsummaryrefslogtreecommitdiffstats
path: root/railties
Commit message (Collapse)AuthorAgeFilesLines
* Also raise error when VERSION is nilRafael Mendonça França2017-04-271-0/+6
| | | | Fix #28905
* Merge pull request #28896 from pschambacher/load_with_sharedRafael França2017-04-263-4/+49
|\ | | | | Added a shared section to config/database.yml that will be loaded for all envs
| * Added a shared section to config/database.yml that will be loaded for all ↵Pierre Schambacher2017-04-263-4/+49
| | | | | | | | environments
* | Merge pull request #28897 from rafaelfranca/fix-name-error-error-pageAaron Patterson2017-04-261-0/+14
|\ \ | | | | | | Do not try to encoding the parameters when the controller is not defined
| * | Do not try to encoding the parameters when the controller is not definedRafael Mendonça França2017-04-261-0/+14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you have a route that points to an nonexistent controller we raise an exception. This exception was being caught by the DebugExceptions middleware in development, but when trying to render the error page, we are reading the request format[[1][]]. To determine the request format we are reading the format parameters[[2][]], and to be able to read the parameters we need to encode them[[3][]]. This was raising another exception that to encode the parameter we try to load the controller to determine if we need to encode the parameters are binary[[4][]]. This new exception inside the DebugExceptions middleware makes Rails to render a generic error page. To avoid this new exception now we only encode the parameters when the controller can be loaded. Fixes #28892 [1]: https://github.com/rails/rails/blob/f52cdaac6336f99d13622ff9bda556a3124a4121/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#L80 [2]: https://github.com/rails/rails/blob/f52cdaac6336f99d13622ff9bda556a3124a4121/actionpack/lib/action_dispatch/http/mime_negotiation.rb#L63 [3]: https://github.com/rails/rails/blob/f52cdaac6336f99d13622ff9bda556a3124a4121/actionpack/lib/action_dispatch/http/parameters.rb#L58 [4]: https://github.com/rails/rails/blob/f52cdaac6336f99d13622ff9bda556a3124a4121/actionpack/lib/action_dispatch/http/parameters.rb#L88
* | Merge pull request #28244 from ixti/improve/action-mailer-preview-paramsRafael França2017-04-263-4/+61
|\ \ | |/ |/| Pass request params to ActionMailer::Preview
| * Pass request params to ActionMailer::PreviewAlexey Zapparov2017-03-013-4/+61
| |
* | Merge pull request #28839 from y-yagi/fix-yarn-exit-statusRafael França2017-04-251-2/+3
|\ \ | | | | | | Ensure bin/yarn matches the one generated by webpacker
| * | Ensure bin/yarn matches the one generated by webpackeryuuji.yaginuma2017-04-231-2/+3
| | | | | | | | | | | | | | | | | | Import from https://github.com/rails/webpacker/pull/277. Fixes https://github.com/rails/webpacker/issues/278
* | | Merge pull request #28831 from kamipo/respond_to_missing_should_be_privateRafael França2017-04-251-4/+4
|\ \ \ | | | | | | | | `respond_to_missing?` should be private
| * | | `respond_to_missing?` should be privateRyuta Kamizono2017-04-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up of 03d3f036. Some of `respond_to?` were replaced to `respond_to_missing?` in 03d3f036. But the visibility is still public. It should be private.
* | | | Replace \Z to \zRyuta Kamizono2017-04-241-3/+3
| |/ / |/| | | | | | | | \Z was a mistake of \z. Replace \Z to \z to prevent newly \Z added.
* | | Set to `form_with_generates_remote_forms` only when config is explicitly ↵yuuji.yaginuma2017-04-221-0/+28
|/ / | | | | | | | | | | | | | | | | specified Without this check, even if config is not specified, `ActionView::Helpers::FormHelper.form_with_generates_remote_forms` always be set to nil and remote form not be generated. Follow up to 128b804c6ce40fcbde744f294f8cb98654f6efec
* | Configure form_with_generates_remote_forms in its own initializerRafael Mendonça França2017-04-211-0/+32
| | | | | | | | | | | | | | | | | | This configuration is not present in ActionView::Base so we can't let the action_view.set_configs initializer set it. Also add tests to make sure this config works. Fixes #28824
* | Namespace CSS selectors on error pagesJan Krutisch2017-04-204-18/+25
| | | | | | | | The css selectors on the generated error pages are too broad (for example `text-align: center` on `body` and thus bleed out to the following pages (say, by pressing the back button) when using Turbolinks. This commit namespaces all the selectors.
* | Merge pull request #28708 from y-yagi/dont_generate_system_test_filesRafael França2017-04-192-0/+15
|\ \ | | | | | | Don't generate system test files if `skip_system_test` option is specified
| * | Don't generate system test files if `skip_system_test` option is specifiedyuuji.yaginuma2017-04-122-0/+15
| | |
* | | Use released sass-rails instead of master versionRafael Mendonça França2017-04-191-1/+1
| | |
* | | Add additional raise UnknownMigrationVersionErrorbogdanvlviv2017-04-191-1/+31
| | | | | | | | | | | | | | | Raise error on the movement of migrations when the current migration does not exist.
* | | Fix `bin/rails db:forward` first migrationbogdanvlviv2017-04-191-0/+25
| | |
* | | Merge pull request #28685 from rails/smooth-form-with-upgradingKasper Timm Hansen2017-04-173-4/+4
|\ \ \ | | | | | | | | Smooth form with upgrading
| * | | Add `form_with_generates_remote_forms` config.Kasper Timm Hansen2017-04-163-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows users to not have remote forms by default, since there's more JS harness, e.g. bundling rails-ujs, otherwise. Also don't skip creating defaults file anymore. Sprockets isn't the only new config.
* | | | Let run_secrets_generator handle chdir.Kasper Timm Hansen2017-04-161-3/+1
| | | |
* | | | Use the config value directly when call `secrets`yuuji.yaginuma2017-04-164-18/+31
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, `read_encrypted_secrets` is set with initializer. Therefore if refer to `secrets` in config, `read_encrypted_secrets` is false, so can not get the value of `secrets.yml.enc`. In order to be able to refer to secrets in config, modified to refer to `config.read_encrypted_secrets` when calling `secrets`. Fixes #28618.
* | | Make code statistics task handle system tests properlyyuuji.yaginuma2017-04-131-1/+2
| | | | | | | | | | | | | | | If it is not added to `TEST_TYPES`, it is not regarded as a test when counting the total count.
* | | Fix rubocop violationsyuuji.yaginuma2017-04-121-1/+1
|/ /
* | SpacesRafael Mendonça França2017-04-071-0/+1
| |
* | More :scissors:Rafael Mendonça França2017-04-071-1/+1
| |
* | :scissors:Rafael França2017-04-071-1/+1
| |
* | Remove duplicated "test" prefixRyuta Kamizono2017-04-072-4/+4
| |
* | Merge pull request #28671 from y-yagi/use_appropriate_type_to_header_optionMatthew Draper2017-04-051-1/+1
|\ \ | | | | | | Use appropriate type to `header` option
| * | Use appropriate type to `header` optionyuuji.yaginuma2017-04-051-1/+1
| | | | | | | | | | | | | | | The `header` option checks only whether it is specified or not. https://github.com/rails/rails/blob/e8c33349bfabca28996ac74d344d69c7aaffec50/railties/lib/rails/commands/dbconsole/dbconsole_command.rb#L52
* | | Merge pull request #27832 from bdewater/backtrace-silencer-regexMatthew Draper2017-04-041-1/+1
|\ \ \ | | | | | | | | Update backtrace cleaner to use `Regexp#match?`
| * | | Update backtrace cleaner to use `Regexp#match?`Bart de Water2017-02-131-1/+1
| | | |
* | | | Merge pull request #28057 from eugeneius/clear_active_connectionsMatthew Draper2017-04-041-0/+8
|\ \ \ \ | |_|/ / |/| | | Clear active connections after initialization
| * | | Clear active connections after initializationEugene Kenny2017-02-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Any connections that were checked out during initialization should be checked back in before the first request is processed, for two reasons: - Returning the connection to the pool allows it to be health checked before it's used again. If the connection dies before the first request arrives, the health check will replace it with a new one. - If the thread that initialized Rails is not the same thread that will be performing work, checking in the connection will allow it to be reused instead of being stuck to the initialization thread forever.
* | | | Merge pull request #28417 from schneems/schneems/symlink-failuresAndrew White2017-03-302-1/+28
|\ \ \ \ | | | | | | | | | | Raise when using a bad symlink
| * | | | Raise when using a bad symlinkschneems2017-03-142-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a case where a dev made a symlink that worked on some machines and not on others. The issue manifested itself on a machine with `RAILS_ENV=staging` as the had their `config/environments/staging.rb` symlinked to another config file. The behavior was very hard to track down. Current behavior: If you use a bad symlink in a file, you get no warnings or failures or anything. If you have a bad symlink it just ignores the file as if it didn't exist (`File.exist?` returns false for a bad symlink). Patch behavior: With this patch when a file is not present we check if a symlink exists. If it does, that indicates there is a bad symlink and we should raise ``` File "config/environments/staging.rb" is a symlink that does not point to a valid file ```
* | | | | Fix the example code for `Rails.groups` [ci skip]Ryunosuke Sato2017-03-301-2/+2
| | | | | | | | | | | | | | | | | | | | `Rails.groups` contains `Rails.env` that is inspected as String.
* | | | | Remove unnecessary `javascript` option checkyuuji.yaginuma2017-03-291-4/+1
| | | | | | | | | | | | | | | | | | | | Follow up to #28546
* | | | | Merge pull request #28549 from jess/patch-1Rafael França2017-03-281-0/+1
|\ \ \ \ \ | | | | | | | | | | | | make it clear how to enable caching
| * | | | | add proper punctuationJess Brown2017-03-231-1/+1
| | | | | |
| * | | | | make it clear how to enable cachingJess Brown2017-03-231-0/+1
| | | | | | | | | | | | | | | | | | since this is a new change, many will be coming here to toggle the true/false config and not find it. This will allow them to quickly implement the change.
* | | | | | No need to duplicate 5-1-stable CHANGELOG. [ci skip]Yves Senn2017-03-281-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `master` changelog refer back to the `5-1-stable` changelog as a base. No need to duplicate backported entries in the changelogs on `master`.
* | | | | | Fix the tests to test what they should be testingRafael Mendonça França2017-03-271-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With Rack::Test the headers needs to match the `HTTP_` format. The tests were passing before because they are not asserting the response was a cache hit.
* | | | | | Merge pull request #28557 from ↵Rafael França2017-03-273-1/+56
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | y-yagi/remove_unnecessary_files_to_api_applications_when_app_task_task_executed Remove unnecessary files to API-only Applications when `app:task` task executed
| * | | | | | Remove unnecessary files to API-only Applications when `app:task` task executedyuuji.yaginuma2017-03-243-1/+56
| |/ / / / /
* | | | | | Merge pull request #28546 from claudiob/drop-j-optionRafael Mendonça França2017-03-272-16/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Remove -j (--javascript) option from `rails new`
| * | | | | | Remove -j (--javascript) option from `rails new`claudiob2017-03-233-16/+5
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "-j" option was added 5 years ago (https://github.com/rails/rails/commit/d9c39c3a) when we wanted to support prototype-rails and jquery-rails. Prototype is not as popular and jQuery is not a requirement anymore. Still the "-j" option can be used to install *any* gem that ends in "-rails". This "might" open security issues and does not bring great benefits anymore. If you know which "-rails"-ending gem you want to install, you can manually add it to the Gemfile just like any other gem.
* | | | | | Apply the log_level defaultRafael Mendonça França2017-03-271-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 4.2 the default log level in production is now debug. We removed the deprecation in c2e865849beadd99866e521a93d733da7d1b5255 but we don't reflected the default value. We are not appling it. Closes #28558