1. 15 9月, 2015 3 次提交
  2. 11 9月, 2015 1 次提交
  3. 09 9月, 2015 3 次提交
    • A
      push content_type assigment in to metal · cd8eb351
      Aaron Patterson 提交于
      everything above metal really doesn't care about setting the content
      type, so lets rearrange these methods to be in metal.
      cd8eb351
    • A
      avoid useless string allocations · 7056e2aa
      Aaron Patterson 提交于
      _set_content_type only does something when there is a request object,
      otherwise the return value of _get_content_type is always ignored. This
      commit moves everything to the module that has access to the request
      object so we'll never to_s unless there is a reason
      7056e2aa
    • A
      use accessors instead of manipulating the hash · b42c5863
      Aaron Patterson 提交于
      in the future I would like to make the header hash read only (or at
      least remove guarantees that mutations will do anything).
      b42c5863
  4. 02 9月, 2015 1 次提交
  5. 30 8月, 2015 2 次提交
  6. 29 8月, 2015 3 次提交
  7. 28 8月, 2015 4 次提交
    • 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
    • A
      Revert "this always sets :public to false, so just do that" · bf203e47
      Aaron Patterson 提交于
      This reverts commit cae2b5bb.
      
      I am an idiot.
      bf203e47
    • A
      cae2b5bb
  8. 27 8月, 2015 7 次提交
  9. 26 8月, 2015 3 次提交
  10. 23 8月, 2015 2 次提交
  11. 17 8月, 2015 1 次提交
  12. 12 8月, 2015 1 次提交
  13. 08 8月, 2015 1 次提交
  14. 06 8月, 2015 6 次提交
  15. 30 7月, 2015 1 次提交
    • S
      Decrease string allocations in url_options · 83ee043c
      schneems 提交于
      The request.script_name is dup-d which allocates an extra string. It is most commonly an empty string "". We can save a ton of string allocations by checking first if the string is empty, if so we can use a frozen empty string instead of duplicating an empty string.
      
      This change buys us 35,714 bytes of memory and 893 fewer objects per request.
      83ee043c
  16. 28 7月, 2015 1 次提交