local-ch / lhc

🚀 Advanced HTTP Client for Ruby. Fueled with interceptors.
GNU General Public License v3.0
43 stars 1 forks source link

! data accessing nil #62

Closed 10xSebastian closed 8 years ago

10xSebastian commented 8 years ago

Patch version

3.7.0 introduced data accessing improvements but also improved the following different behaviour:

before 3.7.0

LHC.get('something').data.not_existing_key # nil

after 3.7.0

LHC.get('something').data.not_existing_key
# throws no method error

This one is especially nasty as it breaks rails auth: https://github.com/local-ch/rails-auth/blob/6c40ebdff156b240ca84aba57bc4a749a3a5cbf9/app/helpers/rails_auth/sessions_helper.rb#L194