1. 06 3月, 2018 4 次提交
  2. 05 3月, 2018 18 次提交
  3. 04 3月, 2018 9 次提交
    • G
      Extract Rails::Command::Spellchecker · a951729f
      Genadi Samokovarov 提交于
      a951729f
    • G
      Introduce explicit rails server handler option · 5af643d8
      Genadi Samokovarov 提交于
      I mistype `rails server production` instead of `rails server -e
      production` expecting to lunch a server in the production environment
      all the time. However, the signature of `rails server --help` is:
      
      ```
      Usage:
        rails server [puma, thin etc] [options]
      ```
      
      This means that the `production` argument is being interpreted as a Rack
      server handler like Puma, Thin or Unicorn.
      
      Should we argue for the `rails server production`? I'm not sure of the
      reasons, but the `rails console production` behavior was deprecated in:
      https://github.com/rails/rails/pull/29358, so parity with the existing
      `rails console production` usage may not hold anymore.
      
      In any case, this PR introduces an explicit option for the Rack servers
      configuration. The option is called `--using` (or `-u` for short) to
      avoid the `rails server --server` tantrum.
      
      The new interface of `rails server` is:
      
      ```
      Usage:
        rails server [using] [options]
      
      Options:
        -p, [--port=port]                        # Runs Rails on the specified port - defaults to 3000.
        -b, [--binding=IP]                       # Binds Rails to the specified IP - defaults to 'localhost' in development and '0.0.0.0' in other environments'.
        -c, [--config=file]                      # Uses a custom rackup configuration.
                                                 # Default: config.ru
        -d, [--daemon], [--no-daemon]            # Runs server as a Daemon.
        -e, [--environment=name]                 # Specifies the environment to run this server under (development/test/production).
        -u, [--using=name]                       # Specifies the Rack server used to run the application (thin/puma/webrick).
        -P, [--pid=PID]                          # Specifies the PID file.
                                                 # Default: tmp/pids/server.pid
        -C, [--dev-caching], [--no-dev-caching]  # Specifies whether to perform caching in development.
            [--early-hints], [--no-early-hints]  # Enables HTTP/2 early hints.
      ```
      
      As a bonus, if you mistype the server to use, you'll get an
      auto-correction message:
      
      ```
      $ rails s tin
      Could not find handler "tin". Maybe you meant "thin" or "cgi"?
      Run `rails server --help` for more options.
      ```
      5af643d8
    • R
      Merge pull request #32164 from ydakuka/patch-1 · 22a67927
      Ryuta Kamizono 提交于
      Fix links in the psql guide [ci skip]
      22a67927
    • K
      Merge pull request #32162 from kaspth/ast-unify-preview-variant-routes-and-controllers · e1378317
      Kasper Timm Hansen 提交于
      Merge Previews/Variants controller into one Representations controller.
      e1378317
    • Y
      Fix links in the psql guide [ci skip] · ccf66ab3
      Yauheni Dakuka 提交于
      ccf66ab3
    • K
      Merge Previews/Variants controller into one Representations controller. · 0f302b89
      Kasper Timm Hansen 提交于
      Since ActiveStorage::Blob::Representable unifies the idea of previews and
      variants under one roof as representation, we may as well have the
      controllers follow suit.
      
      Thus ActiveStorage::RepresenationsController enters the fray. I've copied
      the old tests for both previews and variants and unified those as well.
      0f302b89
    • R
      `id_in_database` do not return nil value for persisted record · 6932998f
      Ryuta Kamizono 提交于
      This removes `|| id` which were added in #9963 and #23887 since it is no
      longer necessary.
      6932998f
    • R
      Eager loading with polymorphic associations should behave consistently · 7d5a7b30
      Ryuta Kamizono 提交于
      This reverts ignoring polymorphic error introduced at 02da8aea.
      
      What the ignoring want to solve was caused by force eager loading
      regardless of whether it is necessary, but it has been fixed by #29043.
      
      The ignoring is now only causing a mismatch of `exists?` behavior with
      `to_a`, `count`, etc. It should behave consistently.
      7d5a7b30
    • R
      Extract all `base_class.name` as `polymorphic_name` · d35875b7
      Ryuta Kamizono 提交于
      This is an alternative of #29722, and follow up of #32048.
      
      This does not change the current behavior, but makes it easier to modify
      all polymorphic names consistently.
      d35875b7
  4. 03 3月, 2018 3 次提交
  5. 02 3月, 2018 6 次提交