1. 29 5月, 2016 1 次提交
  2. 28 5月, 2016 1 次提交
  3. 01 5月, 2016 1 次提交
  4. 15 4月, 2016 1 次提交
  5. 24 3月, 2016 1 次提交
  6. 13 3月, 2016 1 次提交
  7. 12 3月, 2016 1 次提交
  8. 10 3月, 2016 2 次提交
  9. 24 2月, 2016 1 次提交
  10. 19 2月, 2016 2 次提交
  11. 18 2月, 2016 1 次提交
  12. 17 2月, 2016 1 次提交
  13. 15 2月, 2016 1 次提交
  14. 28 1月, 2016 1 次提交
  15. 22 1月, 2016 1 次提交
  16. 20 1月, 2016 3 次提交
  17. 13 1月, 2016 1 次提交
  18. 12 1月, 2016 1 次提交
  19. 31 12月, 2015 1 次提交
  20. 30 12月, 2015 1 次提交
  21. 18 12月, 2015 1 次提交
    • K
      Only dup Ruby's Hash and Array. · 4b46c5ce
      Kasper Timm Hansen 提交于
      When calling `to_h` on an `ActionController::Parameters` instance it would
      `deep_dup` its internal parameters.
      
      This inadvertently called `dup` on a passed Active Record model which would
      create new models. Fix by only dupping Ruby's Arrays and Hashes.
      4b46c5ce
  22. 14 12月, 2015 1 次提交
  23. 05 12月, 2015 1 次提交
  24. 28 9月, 2015 1 次提交
  25. 11 9月, 2015 1 次提交
  26. 29 8月, 2015 3 次提交
  27. 28 8月, 2015 2 次提交
    • X
      revises 877e42e2 · cbe7899f
      Xavier Noria 提交于
      * A string in the example lacked quotes.
      
      * The tests asserted stuff about :last_name, whereas
        test params do not have that key.
      
      * But, the first one passed, why? After hitting my head against
        the wall and doing some obscure rituals realized the new
        #require had an important typo, wanted to iterate over the
        array argument (key), but it ran over its own hash keys
        (method #keys).
      
      * Modified the test to prevent the same typo to happen again.
      
      * The second test assigned to an unused variable safe_params
        that has been therefore removed.
      
      * Grammar of the second test description.
      
      * Since I was on it, reworded both test descriptions.
      cbe7899f
    • G
      [Feature] params.require requires array of params · 877e42e2
      Gaurish Sharma 提交于
      This PR adds ability to accept arrays which allows you to require multiple values in one method. so instead of this:
      
      ```ruby
      params.require(:person).require(:first_name)
      params.require(:person).require(:last_name)
      ```
      
      Here it will be one line for each params, so say if I require 10params, it will be 10lines of repeated code which is not dry. So I have added new method which does this in one line:
      
      ```ruby
      params.require(:person).require([:first_name, :last_name])
      ```
      
      Comments welcome
      877e42e2
  28. 17 8月, 2015 1 次提交
  29. 22 7月, 2015 2 次提交
    • A
      drop conditionals in conversion logic · 5046d517
      Aaron Patterson 提交于
      there is no reason to `convert_hashes_to_parameters` with an assignemt
      flag.  The caller knows whether or not it wants the value assigned.  We
      should just change the uncommon case (not writing to the underlying
      hash) to just call the conversion method and return that value.
      5046d517
    • A
      rearrange logic to use positive branches · c75153d2
      Aaron Patterson 提交于
      only hashes are converted to parameter objects, so lets add a branch for
      them.  This also removes a is_a? test for Parameters so we can be
      abstracted from the class.
      c75153d2
  30. 19 7月, 2015 1 次提交
    • R
      Fix exception overwritten for parameters fetch method · 780af27b
      Roque Pinel 提交于
      When executing an `ActionController::Parameters#fetch` with a block
      that raises a `KeyError` the raised `KeyError` will be rescued and
      converted to an `ActionController::ParameterMissing` exception,
      covering up the original exception.
      
      [Jonas Schubert Erlandsson & Roque Pinel]
      780af27b
  31. 18 7月, 2015 2 次提交