jkrall / analytical

Gem for managing multiple analytics services in your rails app.
MIT License
380 stars 92 forks source link

CrazyEgg module assumes string, gets fixnum and raises exception #11

Closed graysky closed 13 years ago

graysky commented 13 years ago

My key is like: 12345678

The crazy egg module does this:

code_url = "#{options[:key][0,4]}/#{options[:key][4,4]}"

which would work if "key" is a String, but YAML reads the key as a Fixnum and throws: wrong number of arguments (2 for 1) analytical-2.6.0/lib/analytical/modules/crazy_egg.rb:13:in `[]'

calling "to_s" before the indexing should fix. There are no specs for this module or I would have just submitted a patch. Instead I hacked a workaround by appending "xxx" to my key to force it to be a String.

jkrall commented 13 years ago

Fixing crazyegg if key is numeric Closed by 3ee95d3a4dcaf3be4404f7bdd5c33d7967d939b9