-
-
Save anonymous/842d17be19f02a060847 to your computer and use it in GitHub Desktop.
UserPresenter
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 V1::UsersPresenter | |
def initialize(users) | |
@users = users | |
end | |
def as_json(*) | |
@per_page.to_json | |
@users.to_json(only: [:location, :name, :type, :location_description, :address], include: { location: { only: :coordinates }, address: { only: :street}}) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment