aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/json/decoding_test.rb
diff options
context:
space:
mode:
authorTimo Schilling <timo@schilling.io>2014-12-16 11:30:24 +0100
committerTimo Schilling <timo@schilling.io>2014-12-16 11:37:04 +0100
commite1fb3483d6402bd66c41a12d158fd1c987fac983 (patch)
tree0b866c170acfb07f15870f28e81a8f304e0f042c /activesupport/test/json/decoding_test.rb
parent41dc7fd650b0fcaf8f05f895aab13febac0739ec (diff)
downloadrails-e1fb3483d6402bd66c41a12d158fd1c987fac983.tar.gz
rails-e1fb3483d6402bd66c41a12d158fd1c987fac983.tar.bz2
rails-e1fb3483d6402bd66c41a12d158fd1c987fac983.zip
allow reseting of request variants
The current implementation of `variants=` don't allow a resetting to nil, wich is the default value. This results in the following code smell: ```ruby case request.user_agent when /iPhone/ request.variants = :phone when /iPad/ request.variants = :ipad end ``` With the ability to reset variants to nil, it could be: ```ruby request.variants = case request.user_agent when /iPhone/ :phone when /iPad/ :ipad end ```
Diffstat (limited to 'activesupport/test/json/decoding_test.rb')
0 files changed, 0 insertions, 0 deletions