Skip to content

nil param value that expects a hash should return :key => nil #20

Closed
wants to merge 4 commits into from
Commits on Apr 9, 2012
  1. @bjhess

    When a nil param value arrives in place of an expected hash, return

    bjhess committed Apr 9, 2012
    :key => nil, not simply nil.
    
    Prior:
    
    (rdb:1) params
    {"book"=>nil}
    (rdb:1) params.permit(book: { genre: :type })
    nil
    
    Now:
    
    (rdb:1) params
    {"book"=>nil}
    (rdb:1) params.permit(book: { genre: :type })
    {"book"=>nil}
  2. @bjhess

    When a nil param value arrives in place of an expected hash, return

    bjhess committed Apr 9, 2012
    :key => nil, not simply nil.
    
    Prior:
    
    (rdb:1) params
    {"book"=>nil}
    (rdb:1) params.permit(book: { genre: :type })
    nil
    
    Now:
    
    (rdb:1) params
    {"book"=>nil}
    (rdb:1) params.permit(book: { genre: :type })
    {"book"=>nil}
Commits on Apr 17, 2012
  1. @bjhess
Commits on May 14, 2012
  1. @bjhess
Something went wrong with that request. Please try again.