aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #28244 from ixti/improve/action-mailer-preview-paramsRafael França2017-04-262-4/+10
|\ \ | |/ |/| Pass request params to ActionMailer::Preview
| * Pass request params to ActionMailer::PreviewAlexey Zapparov2017-03-012-4/+10
| |
* | 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
* | | `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.
* | Namespace CSS selectors on error pagesJan Krutisch2017-04-203-18/+18
| | | | | | | | 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-191-0/+4
|\ \ | | | | | | 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-121-0/+4
| | |
* | | Use released sass-rails instead of master versionRafael Mendonça França2017-04-191-1/+1
| | |
* | | Merge pull request #28685 from rails/smooth-form-with-upgradingKasper Timm Hansen2017-04-172-3/+4
|\ \ \ | | | | | | | | Smooth form with upgrading
| * | | Add `form_with_generates_remote_forms` config.Kasper Timm Hansen2017-04-162-3/+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.
* | | | Use the config value directly when call `secrets`yuuji.yaginuma2017-04-163-10/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| |
* | 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 #28417 from schneems/schneems/symlink-failuresAndrew White2017-03-301-1/+8
|\ \ \ | | | | | | | | Raise when using a bad symlink
| * | | Raise when using a bad symlinkschneems2017-03-141-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge pull request #28557 from ↵Rafael França2017-03-272-1/+34
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 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-242-1/+34
| |/ / / /
* | | | | Merge pull request #28546 from claudiob/drop-j-optionRafael Mendonça França2017-03-271-8/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Remove -j (--javascript) option from `rails new`
| * | | | | Remove -j (--javascript) option from `rails new`claudiob2017-03-231-8/+0
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Merge pull request #28577 from ↵Rafael França2017-03-271-0/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | y-yagi/do_not_display_hidden_namespaces_in_destroy_command_help Do not show hidden namespaces in destroy commnad help
| * | | | | Do not show hidden namespaces in destroy commnad helpyuuji.yaginuma2017-03-271-0/+3
| | | | | |
* | | | | | Merge pull request #28541 from ota42y/fix/gemfile_generator_fixEileen M. Uchitelle2017-03-273-2/+6
|\ \ \ \ \ \ | |/ / / / / |/| | | | | ignore system test gems on Gemfile when execute with --skip-test option
| * | | | | ignore system test gems on Gemfile when execute with --skip-test optionota42y2017-03-273-2/+6
| |/ / / /
* / / / / add field ids when generating a scaffold form.Yves Senn2017-03-262-3/+7
|/ / / / | | | | | | | | | | | | | | | | | | | | This is a follow up to a6d065e. When using `form_with` you must supply field ids manually. Since the scaffold generator is using labels we need to make sure that they are linked up properly.
* | | | Merge pull request #28534 from claudiob/list-webpackersRafael França2017-03-221-1/+2
|\ \ \ \ | | | | | | | | | | List options for `rails new --webpack=WEBPACK`
| * | | | List options for `rails new --webpack=WEBPACK`claudiob2017-03-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you type `rails new -h`, the `--database=DATABASE` options display this useful message: > Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) However, the `--webpack=WEBPACK` option only displays this: > Preconfigure for app-like JavaScript with Webpack so it's hard to know *which* values are valid for `WEBPACK`. This commit improves the help message to display: > Preconfigure for app-like JavaScript with Webpack (options: react/vue/angular) The implication of this commit is that the list needs to be manually updated whenever rails/webpacker adds support for a new framework. However, I don't imagine this list to change very frequently, and I think that the benefit of display the list to the users is greater than the hustle of updating the list when needed.
* | | | | Merge pull request #28527 from rst/fix_runner_argv_28515Rafael França2017-03-221-2/+3
|\ \ \ \ \ | | | | | | | | | | | | Correctly reset ARGV for "rails runner `CODE' arg arg arg..."
| * | | | | Correctly reset ARGV for "rails runner `CODE' arg arg arg..."Robert Thau2017-03-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code itself should not be in the ARGV vector. Fixes #28515
* | | | | | Merge pull request #28513 from maclover7/jm-fix-28500Rafael França2017-03-221-2/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | CLI arg "host" has precedence over ENV var "host"
| * | | | | | CLI arg "host" has precedence over ENV var "host"Jon Moss2017-03-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression from when the server command switched to its own argument parser, as opposed to Rack's. Rack's argument parser, when provided with a "host" argument, gives that value precedence over environment variables.
* | | | | | | Merge pull request #28524 from claudiob/comment-api-keyRafael França2017-03-221-2/+2
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | Don't add a dummy API key to every new Rails app
| * | | | | | Don't add a dummy API key to every new Rails appclaudiob2017-03-221-2/+2
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every new Rails app is currently generated with `Rails.application.secrets[:api_key]` set to `123`. This comes from a line in `config/secrets.yml` that, in my opinion, should be left commented out to only serve as a syntax example, rather than being actually set in every Rails app. Additionally, we might want to give a better example than `123`, since in the same file we are suggesting to > Make sure the secret is at least 30 characters and all random, > no regular words or you'll be exposed to dictionary attacks. The result of this commit is that `config/secrets.yml` will include something like: ```yaml # Shared secrets are available across all environments. # shared: # api_key: f56930851993982510d5bd9236f4108f6fe7c15448f1c6923a51872e0dbae1a24d274b318abb6518b540dfb51079c61640885f607467e5ed1053849be7587d61 ``` rather than this: ```yaml # Shared secrets are available across all environments. shared: api_key: 123 ```
* / | | | | Don't comment out config.file_watcher during Rails upgradeyuuji.yaginuma2017-03-221-2/+0
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary only when updating to Rails 5.0, it is not necessary for updating to 5.1. Related #24243
* / / / / Start Rails 5.2 developmentMatthew Draper2017-03-223-2/+6
|/ / / /
* | | | Default to yielding a `form` variable.Kasper Timm Hansen2017-03-201-8/+8
| | | | | | | | | | | | | | | | More intention revealing and means `f` can go F itself 😋
* | | | Merge pull request #28406 from ↵Kasper Timm Hansen2017-03-201-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | chukitow/feature/user-form-with-instead-of-form-for-scaffold user form with instead of form for in scaffold generator