1. 04 5月, 2014 1 次提交
  2. 09 10月, 2013 1 次提交
  3. 25 8月, 2013 1 次提交
  4. 18 8月, 2013 3 次提交
  5. 26 7月, 2013 1 次提交
    • A
      Fix order dependent AP test · 24869e38
      Akira Matsuda 提交于
      any_instance.stubs + unstub with Mocha doesn't restore the original status in the following case,
      so we need to undef Customer#to_json before every test
      
      require 'test/unit'
      require 'mocha/setup'
      
      module M
        def foo() :foo; end
      end
      
      class C
        include M
      
        undef_method :foo
      end
      
      C.any_instance.stubs(:foo).returns(:mocha)
      
      C.any_instance.unstub(:foo)
      24869e38
  6. 25 2月, 2013 1 次提交
  7. 08 12月, 2012 1 次提交
  8. 27 10月, 2012 1 次提交
  9. 06 8月, 2012 1 次提交
  10. 03 8月, 2012 2 次提交
  11. 07 7月, 2012 1 次提交
    • M
      Prevent conflict between mime types and Object methods · 021f3d24
      Mircea Pricop 提交于
      Assuming the type ":touch", Collector.new was calling
      send(:touch), which instead of triggering method_missing
      and generating a new collector method, actually
      invoked the private method `touch` inherited from
      Object.
      
      By generating the method for each mime type as it
      is registered, the private methods on Object can
      never be reached by `send`, because the `Collector`
      will have them before `send` is called on it.
      
      To do this, a callback mechanism was added to Mime::Type
      
      This allows someone to add a callback for whenever
      a new mime type is registered. The callback then
      gets called with the new mime as a parameter.
      
      This is then used in AbstractController::Collector
      to generate new collector methods after each mime
      is registered.
      021f3d24
  12. 06 5月, 2012 1 次提交
  13. 25 4月, 2012 1 次提交
    • J
      Remove default match without specified method · 56cdc81c
      Jose and Yehuda 提交于
      In the current router DSL, using the +match+ DSL
      method will match all verbs for the path to the
      specified endpoint.
      
      In the vast majority of cases, people are
      currently using +match+ when they actually mean
      +get+. This introduces security implications.
      
      This commit disallows calling +match+ without
      an HTTP verb constraint by default. To explicitly
      match all verbs, this commit also adds a
      :via => :all option to +match+.
      
      Closes #5964
      56cdc81c
  14. 07 3月, 2012 1 次提交
  15. 06 3月, 2012 1 次提交
  16. 23 2月, 2012 1 次提交
    • D
      Add config.default_method_for_update to support PATCH · 002713c6
      David Lee 提交于
      PATCH is the correct HTML verb to map to the #update action. The
      semantics for PATCH allows for partial updates, whereas PUT requires a
      complete replacement.
      
      Changes:
      * adds config.default_method_for_update you can set to :patch
      * optionally use PATCH instead of PUT in resource routes and forms
      * adds the #patch verb to routes to detect PATCH requests
      * adds #patch? to Request
      * changes documentation and comments to indicate support for PATCH
      
      This change maintains complete backwards compatibility by keeping :put
      as the default for config.default_method_for_update.
      002713c6
  17. 04 2月, 2012 1 次提交
    • P
      Fix override API response bug in respond_with · 3def1c8e
      Prem Sichanugrist 提交于
      Default responder was only using the given respond block when user
      requested for HTML format, or JSON/XML format with valid resource. This
      fix the responder so that it will use the given block regardless of the
      validity of the resource. Note that in this case you'll have to check
      for object's validity by yourself in the controller.
      
      Fixes #4796
      3def1c8e
  18. 17 1月, 2012 1 次提交
  19. 26 10月, 2011 1 次提交
  20. 24 10月, 2011 1 次提交
  21. 11 10月, 2011 1 次提交
  22. 10 10月, 2011 1 次提交
  23. 03 7月, 2011 1 次提交
  24. 30 6月, 2011 1 次提交
  25. 26 5月, 2011 1 次提交
  26. 13 4月, 2011 2 次提交
  27. 12 4月, 2011 1 次提交
  28. 11 4月, 2011 1 次提交
  29. 01 4月, 2011 3 次提交
  30. 18 1月, 2011 1 次提交
  31. 27 12月, 2010 1 次提交
  32. 28 11月, 2010 1 次提交
  33. 25 11月, 2010 2 次提交