I'm trying to return the API response as lowerCamelCase but it is not working, I need to do this for all my Controllers/fields so I need a solution for entire project.
I've tried a lot of stuff, including this (http://brentvatne.ca/automatic-casing-activemodel-serializer/) who tells me to configure Activemodel to lower_camel as following
ActiveModel::Serializer.config.key_format = :lower_camel
But that is not working, it is returning the following json
{
"users": [{
"id": "56b110089c28691b84a3bd73",
"first_name": "Lucas"
}]
}
I need to transform the first_name into firstName.
Versions:
rails -v
Rails 4.2.5
ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32]
And the gems
active_model_serializers (0.10.0.rc4)
rails-api (0.4.0)
My ember App recognize the JSON but I don't want to use snake case variables on JS