1. 27 2月, 2016 14 次提交
  2. 26 2月, 2016 19 次提交
  3. 25 2月, 2016 7 次提交
    • J
      Fix uniqueness validation with an after_create hook. · 0379da6a
      Joe Rafaniello 提交于
      record.id_was is nil in after_create/after_save, so we should use
      id in these cases.
      
      While this logic feels incomplete, the existing update_record uses the same
      logic:
      https://github.com/rails/rails/blob/2fda4e0874a97a76107ab9e88305169f2c625933/activerecord/lib/active_record/relation.rb#L83
      
      This logic was originally added for a similar problem:
      updates not working with after_create hook.
      
      See: 482f8c15
      
      Followup to #23581
      Fixes #23844
      0379da6a
    • A
      Merge pull request #23874 from st0012/update-documents · 2fda4e08
      Andrew White 提交于
      [ci skip] Update configuration guide
      2fda4e08
    • K
      Additional review of 6b317617. · 46cb45df
      Kasper Timm Hansen 提交于
      * Fixes typos in error message and release notes.
      * Removes unused template test file.
      46cb45df
    • G
      Merge pull request #23827 from rails/new_implicit_render · 6b317617
      Godfrey Chan 提交于
      Lock down new `ImplicitRender` behavior for 5.0 RC
      6b317617
    • G
      Lock down new `ImplicitRender` behavior for 5.0 RC · 73b1efc5
      Godfrey Chan 提交于
      1. Conceptually revert #20276
      
         The feature was implemented for the `responders` gem. In the end,
         they did not need that feature, and have found a better fix (see
         plataformatec/responders#131).
      
         `ImplicitRender` is the place where Rails specifies our default
         policies for the case where the user did not explicitly tell us
         what to render, essentially describing a set of heuristics. If
         the gem (or the user) knows exactly what they want, they could
         just perform the correct `render` to avoid falling through to
         here, as `responders` did (the user called `respond_with`).
      
         Reverting the patch allows us to avoid exploding the complexity
         and defining “the fallback for a fallback” policies.
      
      2. `respond_to` and templates are considered exhaustive enumerations
      
         If the user specified a list of formats/variants in a `respond_to`
         block, anything that is not explicitly included should result
         in an `UnknownFormat` error (which is then caught upstream to
         mean “406 Not Acceptable” by default). This is already how it
         works before this commit.
      
         Same goes for templates – if the user defined a set of templates
         (usually in the file system), that set is now considered exhaustive,
         which means that “missing” templates are considered `UnknownFormat`
         errors (406).
      
      3. To keep API endpoints simple, the implicit render behavior for
         actions with no templates defined at all (regardless of formats,
         locales, variants, etc) are defaulted to “204 No Content”. This
         is a strictly narrower version of the feature landed in #19036 and
         #19377.
      
      4. To avoid confusion when interacting in the browser, these actions
         will raise an `UnknownFormat` error for “interactive” requests
         instead. (The precise definition of “interactive” requests might
         change – the spirit here is to give helpful messages and avoid
         confusions.)
      
      Closes #20666, #23062, #23077, #23564
      
      [Godfrey Chan, Jon Moss, Kasper Timm Hansen, Mike Clark, Matthew Draper]
      73b1efc5
    • S
      d0c8117c
    • S
      Update config.force_ssl's documentation · 4e823467
      Stan Lo 提交于
      4e823467