Question: I can't use friendly URLs in my DotNetNuke site and a module that I want to use requires it. The problem is when they post to the 2nd part of the module process they tack on a "?ctlname=Step2" and then "?ctlname=Step3" for the next step. So...

the Url ends up being something like this:

default.aspx?tab=123\**?*\*ctlname=Step2

I'm trying to solve this by rewriting the URL. This seems like it should work but doesn't.

```
<RewriterRule>
  <LookFor>.*/Default.aspx\?tabid=123(\?ctlname=.*)$</LookFor>
  <SendTo>~/Default.aspx?tabid=123&amp;ctlname=$1</SendTo>
</RewriterRule>

```

Any help would be appreciated!

Answer: 
```
hash = MyModel.count(group: 'id', conditions: 'bla = "bla"')

```

should have `Fixnum` keys by default since id is an instance of Fixnum.

What happens is that ActiveRecord **always fetch result as strings** and then Rails takes care of converting them to other datatypes according to the type of the database column (we say that they are typecast).

So it's maybe a Rails bug or the 'id' column is not set as integer(which would be surprising).

If you can't fix it, convert them manually:

```
hash.each_with_object({}) do |(key, value), hash|
  hash[key.to_i] = value
end

```
```
new_hash = Hash[hash.map { |k, v| [k.to_i, v] }

```