1. 04 1月, 2015 11 次提交
  2. 03 1月, 2015 2 次提交
    • R
      Fix a few typos [ci skip] · 9b9ec0de
      Robin Dupret 提交于
      9b9ec0de
    • C
      Throw :abort halts default CallbackChains · 2386daab
      claudiob 提交于
      This commit changes arguments and default value of CallbackChain's :terminator
      option.
      
      After this commit, Chains of callbacks defined **without** an explicit
      `:terminator` option will be halted as soon as a `before_` callback throws
      `:abort`.
      
      Chains of callbacks defined **with** a `:terminator` option will maintain their
      existing behavior of halting as soon as a `before_` callback matches the
      terminator's expectation. For instance, ActiveModel's callbacks will still
      halt the chain when a `before_` callback returns `false`.
      2386daab
  3. 02 1月, 2015 1 次提交
  4. 31 12月, 2014 4 次提交
  5. 30 12月, 2014 3 次提交
  6. 29 12月, 2014 2 次提交
  7. 26 12月, 2014 1 次提交
  8. 25 12月, 2014 1 次提交
    • C
      Remove ActionController::ModelNaming · 4761d819
      claudiob 提交于
      The methods in these modules are not used anywhere. They used to be
      invoked in polymorphic_routes.rb but their usage was removed in e8210450.
      
      What is your opinion about removing these methods?
      
      They do belong to the public API, but in reality their code has already been duplicated to ActionView::ModelNaming, since they are used by methods like `dom_id` and `dom_class` to associated records with DOM elements (in
      ActionView).
      
      Please tell me if you think that removing this module is a good idea and,
      in that case, if the PR is okay as it is, or you'd rather start by showing
      a deprecation message, and remove the module in Rails 5.1.
      4761d819
  9. 24 12月, 2014 1 次提交
  10. 23 12月, 2014 1 次提交
  11. 22 12月, 2014 1 次提交
  12. 20 12月, 2014 1 次提交
  13. 19 12月, 2014 3 次提交
  14. 18 12月, 2014 1 次提交
  15. 17 12月, 2014 1 次提交
  16. 16 12月, 2014 2 次提交
    • T
      allow reseting of request variants · e1fb3483
      Timo Schilling 提交于
      The current implementation of `variants=` don't allow a resetting to nil, wich is the default value.
      
      This results in the following code smell:
      ```ruby
      case request.user_agent
      when /iPhone/
        request.variants = :phone
      when /iPad/
        request.variants = :ipad
      end
      ```
      
      With the ability to reset variants to nil, it could be:
      ```ruby
      request.variants = case request.user_agent
      when /iPhone/
        :phone
      when /iPad/
        :ipad
      end
      ```
      e1fb3483
    • C
      Remove misleading test: around_action return false · 8dfa585d
      claudiob 提交于
      When an `around_action` does not `yield`, then the corresponding action is
      *never* executed and the `after_` actions are *never* invoked.
      
      The value returned by the `around_action` does not have any impact on this:
      an `around_action` can "return" `true`, `false`, or `"pizza"`, but as long
      as `yield` is not invoked, the corresponding action and after callbacks are
      not executed.
      
      The test suite for `ActionController::Callbacks` currently includes separate
      tests to distinguish the cases in which a non-yielding `around_actions` returns
      `true` or `false`.
      
      In my opinion, having such tests is misleading, giving the impression that the
      returned value might have some sort of impact, while it does not. At least
      that's the impression I got when I read those tests.
      
      For completeness, the tests were introduced 7 years ago by @NZKoz in e80fabbb.
      8dfa585d
  17. 15 12月, 2014 1 次提交
  18. 14 12月, 2014 2 次提交
  19. 13 12月, 2014 1 次提交