1. 03 12月, 2013 1 次提交
  2. 02 12月, 2013 2 次提交
    • A
      Try to escape each part of a path redirect route correctly · d2e1caaa
      Andrew White 提交于
      A path redirect may contain any and all parts of a url which have different
      escaping rules for each part. This commit tries to escape each part correctly
      by splitting the string into three chunks - path (which may also include a host),
      query and fragment; then it applies the correct escape pattern to each part.
      
      Whilst using `URI.parse` would be better, unfortunately the possible presence
      of %{name} parameters in the path redirect string prevents us from using it so
      we have to use a regular expression instead.
      
      Fixes #13110.
      d2e1caaa
    • T
      223ff794
  3. 01 12月, 2013 1 次提交
  4. 25 11月, 2013 1 次提交
  5. 22 11月, 2013 3 次提交
  6. 15 11月, 2013 8 次提交
  7. 14 11月, 2013 1 次提交
  8. 12 11月, 2013 1 次提交
  9. 11 11月, 2013 1 次提交
  10. 07 11月, 2013 6 次提交
  11. 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
  12. 05 11月, 2013 1 次提交
    • G
      Improve Errors when Controller Name or Action isn't specfied · 834eb80b
      Gaurish Sharma 提交于
      These errors occur when, there routes are wrongly defined.
      
      example, the following line would cause a missing :action error
      
          root "welcomeindex"
      
      Mostly beginners are expected to hit these errors, so lets improve the error message a bit to make their learning experience bit better.
      834eb80b
  13. 04 11月, 2013 3 次提交
  14. 03 11月, 2013 2 次提交
  15. 01 11月, 2013 2 次提交
  16. 30 10月, 2013 1 次提交
  17. 27 10月, 2013 2 次提交
  18. 24 10月, 2013 2 次提交
  19. 10 10月, 2013 1 次提交
    • A
      Respect `SCRIPT_NAME` when using `redirect` with a relative path · 9dbd2085
      Andrew White 提交于
      Example:
          # application routes.rb
          mount BlogEngine => '/blog'
      
          # engine routes.rb
          get '/admin' => redirect('admin/dashboard')
      
      This now redirects to the path `/blog/admin/dashboard`, whereas before it
      would've generated an invalid url because there would be no slash between
      the host name and the path. It also allows redirects to work where the
      application is deployed to a subdirectory of a website.
      
      Fixes #7977
      9dbd2085