Created
July 27, 2015 13:20
-
-
Save SleeplessByte/a7492a580a2f9b7830dd to your computer and use it in GitHub Desktop.
Camelize Grape Entity output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class XmlEntity < Grape::Entity | |
protected | |
def self.key_for( attribute ) | |
( exposures[ attribute.to_sym ][ :as ] || name_for( attribute ) ).to_s.camelize | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment