1. 19 12月, 2013 1 次提交
  2. 06 11月, 2013 1 次提交
    • G
      Eliminate `JSON.{parse,load,generate,dump}` and `def to_json` · ff1192fe
      Godfrey Chan 提交于
      JSON.{dump,generate} offered by the JSON gem is not compatiable with
      Rails at the moment and can cause a lot of subtle bugs when passed
      certain data structures. This changed all direct usage of the JSON gem
      in internal Rails code to always go through AS::JSON.{decode,encode}.
      
      We also shouldn't be implementing `to_json` most of the time, and
      these occurances are replaced with an equivilent `as_json`
      implementation to avoid problems down the road.
      
      See [1] for all the juicy details.
      
      [1]: intridea/multi_json#138 (comment)
      ff1192fe
  3. 19 9月, 2013 1 次提交
  4. 01 4月, 2013 1 次提交
  5. 25 3月, 2013 1 次提交
  6. 27 2月, 2013 1 次提交
  7. 03 1月, 2013 1 次提交
  8. 28 8月, 2012 1 次提交
    • S
      Add Missing Keys from Journey on failed URL format · 0b6175ac
      schneems 提交于
      Many named routes have keys that are required to successfully resolve. If a key is left off like this:
      
          <%= link_to 'user', user_path %>
      
      This will produce an error like this:
      
          No route matches {:action=>"show", :controller=>"users"}
      
      Since we know that the :id is missing, we can add extra debugging information to the error message.
      
          No route matches {:action=>"show", :controller=>"users"} missing required keys: [:id]
      
      
      This will help new and seasoned developers look closer at their parameters. I've also subclassed the routing error to be clear that this error is a result of attempting to generate a url and not because the user is trying to visit a bad url. 
      
      While this may sound trivial this error message is misleading and confuses most developers. The important part isn't what's in the options its's what's missing. Adding this information to the error message will make debugging much more obvious. 
      
      This is the sister pull request of https://github.com/rails/journey/pull/44 which will be required to get they missing keys into the correct error message. 
      
      Example Development Error in Rails: http://cl.ly/image/3S0T0n1T3421
      0b6175ac
  9. 20 8月, 2012 1 次提交
  10. 15 6月, 2012 2 次提交
  11. 05 5月, 2012 1 次提交
  12. 02 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. 04 3月, 2012 1 次提交
  15. 02 3月, 2012 1 次提交
  16. 26 2月, 2012 1 次提交
  17. 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
  18. 15 2月, 2012 1 次提交
  19. 12 2月, 2012 1 次提交
  20. 24 1月, 2012 2 次提交
  21. 17 1月, 2012 1 次提交
  22. 06 1月, 2012 1 次提交
  23. 25 12月, 2011 1 次提交
  24. 23 12月, 2011 2 次提交
  25. 22 12月, 2011 2 次提交
  26. 23 12月, 2011 2 次提交
  27. 20 12月, 2011 1 次提交
  28. 05 12月, 2011 1 次提交
  29. 30 11月, 2011 1 次提交
  30. 28 11月, 2011 1 次提交
  31. 17 8月, 2011 1 次提交
  32. 14 8月, 2011 1 次提交
  33. 13 8月, 2011 1 次提交
  34. 01 8月, 2011 1 次提交
  35. 03 5月, 2011 1 次提交