rails-api/active_model_serializers — pull request #662 by jastkand (2014-09-22 19:37:23+00:00)
Title: Add auto-stripping of question mark for attributes

This is a pull-request for issue #605. There is a little mess in this part
```ruby
striped_attrs = attrs.map do |attr|
symbolized = attr.is_a?(Symbol)

attr = attr.to_s.gsub(/\?\Z/, '')
attr = attr.to_sym if symbolized
attr
end
```
I had to add condition of checking attribute type to make tests from this commit https://github.com/rails-api/active_model_serializers/commit/06e4c2c9d601a067124e2653ff66e0c8c5320867 pass.
As we can see if we pass string params to `attributes` method than output hash will be generated with string param as a key.

Example:
```ruby
class UserSerializer < ActiveModel::Serializer
attributes 'name', :gender
end
```

```ruby
UserSerializer.new(user).as_json # => { 'name' => 'John Doe', :gender => 'male' }
```

I think that this is a little bit strange. It would be much predictable to generate symbolized hash no matter what kind of param was passed to `attributes` method. Tell me if you agree with this and I'll fix this pull-request.