1. 20 6月, 2017 1 次提交
  2. 11 6月, 2017 1 次提交
  3. 09 6月, 2017 2 次提交
  4. 08 6月, 2017 1 次提交
  5. 03 6月, 2017 1 次提交
  6. 30 5月, 2017 1 次提交
    • R
      Remove requirement on mathn · ba848675
      Robin Dupret 提交于
      The test using mathn was first introduced in f1d91790 to check that the
      `distance_of_time_in_words` properly doesn't use the `Fixnum#/` method
      by explicitly requiring this library as it redefines this method.
      
      Given that `mathn` has been gemified in Ruby 2.5 and is deprecated since
      version 2.2, we can certainly safely assume that people will most-likely
      not require this library in their application.
      
      However, to make sure that we don't regress, let's add a test similar to
      the one before f1d91790.
      ba848675
  7. 23 5月, 2017 1 次提交
  8. 20 5月, 2017 1 次提交
  9. 19 5月, 2017 2 次提交
  10. 17 5月, 2017 1 次提交
    • S
      Fix select tag helper used with Enumerable choices · efe62b71
      Sam Pohlenz 提交于
      Allows a custom object implementing Enumerable to be used as the choices
      parameter for a select tag, which previously wasn't possible due to the
      call to `empty?` on the choices (which isn't implemented on Enumerable).
      efe62b71
  11. 07 5月, 2017 1 次提交
  12. 28 4月, 2017 1 次提交
    • J
      Ensure input to distance_of_time_in_words is not nil · 756de667
      Jay Hayes 提交于
      * Internally all input is converted to time so that it can be treated
        uniformly.
      
      Remove now-unneeded condition
      
      * Now that all input is treated is converted to time, we no longer need
        to type check it.
      
      Rename variables to clarify their purpose
      
      Extract private method to normalize distance_of_time args to time
      
      Update actionview changelog
      756de667
  13. 27 4月, 2017 1 次提交
  14. 24 4月, 2017 2 次提交
  15. 22 4月, 2017 1 次提交
  16. 20 4月, 2017 1 次提交
  17. 19 4月, 2017 1 次提交
  18. 14 4月, 2017 1 次提交
  19. 13 4月, 2017 1 次提交
  20. 11 4月, 2017 1 次提交
  21. 30 3月, 2017 1 次提交
  22. 23 3月, 2017 1 次提交
  23. 18 3月, 2017 1 次提交
    • A
      Always use original url_for when generating direct routes · fd16e1a9
      Andrew White 提交于
      Action View overrides `url_for` in the view context to render paths by
      default when using `url_for` and this means that direct route helpers
      don't get the full url when called with the url suffix. To fix this
      always call the original `url_for`.
      fd16e1a9
  24. 10 3月, 2017 1 次提交
    • P
      Prevent event propogation if element is disabled when event chain begins. · 9ca71234
      Patrick Toomey 提交于
      The existing UJS event behavior relies on browsers not sending events for
      various events when an element is disabled. For example, imagine the following:
      
          <button type="submit" disabled="disabled">Click me</button>
      
      The above button is disabled, so browsers will not trigger a click event and
      all UJS behavior is prevented. However, imagine a button like this:
      
          <button type="submit" disabled="disabled"><strong>Click me</strong></button>
      
      The above is treated differently by browsers such as Chrome/Safari. These
      browsers do not consider the strong tag to be disabled, and will trigger click
      events. UJS has logic to walk up the DOM to find an associated element subject
      to UJS behavior. But, this logic does not take into account the disabled
      status of the element.
      
      I originally thought we could simply change the selectors used to match
      elements to ignore disabled elements. However, UJS disables some elements as
      part of the event chain. So, an element might match early in the chain and
      then fail to match later. Instead of changing the selectors I added a callback
      to the chain that calls `stopEverything` if an element is disabled when the
      event chain begins.
      9ca71234
  25. 02 3月, 2017 1 次提交
    • A
      Deprecate implicit coercion of `ActiveSupport::Duration` · 75924c45
      Andrew White 提交于
      Currently `ActiveSupport::Duration` implicitly converts to a seconds
      value when used in a calculation except for the explicit examples of
      addition and subtraction where the duration is the receiver, e.g:
      
          >> 2 * 1.day
          => 172800
      
      This results in lots of confusion especially when using durations
      with dates because adding/subtracting a value from a date treats
      integers as a day and not a second, e.g:
      
          >> Date.today
          => Wed, 01 Mar 2017
          >> Date.today + 2 * 1.day
          => Mon, 10 Apr 2490
      
      To fix this we're implementing `coerce` so that we can provide a
      deprecation warning with the intent of removing the implicit coercion
      in Rails 5.2, e.g:
      
          >> 2 * 1.day
          DEPRECATION WARNING: Implicit coercion of ActiveSupport::Duration
          to a Numeric is deprecated and will raise a TypeError in Rails 5.2.
          => 172800
      
      In Rails 5.2 it will raise `TypeError`, e.g:
      
          >> 2 * 1.day
          TypeError: ActiveSupport::Duration can't be coerced into Integer
      
      This is the same behavior as with other types in Ruby, e.g:
      
          >> 2 * "foo"
          TypeError: String can't be coerced into Integer
          >> "foo" * 2
          => "foofoo"
      
      As part of this deprecation add `*` and `/` methods to `AS::Duration`
      so that calculations that keep the duration as the receiver work
      correctly whether the final receiver is a `Date` or `Time`, e.g:
      
          >> Date.today
          => Wed, 01 Mar 2017
          >> Date.today + 1.day * 2
          => Fri, 03 Mar 2017
      
      Fixes #27457.
      75924c45
  26. 28 2月, 2017 1 次提交
  27. 23 2月, 2017 1 次提交
  28. 20 2月, 2017 3 次提交
  29. 12 2月, 2017 1 次提交
  30. 06 2月, 2017 2 次提交
  31. 02 2月, 2017 4 次提交