Created
March 28, 2019 11:42
-
-
Save MaryKuz/2a836b27162822780ad84ccaa7fbfffa to your computer and use it in GitHub Desktop.
Create UserDecorator
This file contains 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 UserDecorator < Draper::Decorator | |
delegate_all | |
def as_json *args | |
{ | |
name: name, | |
email: email | |
} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment