Created
March 27, 2013 16:05
-
-
Save stevencwarren/5255433 to your computer and use it in GitHub Desktop.
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 ProjectSerializer < ActiveModel::Serializer | |
attributes :id, :title, :status, :owner, :description, :created_at, :updated_at, :cover_image_url, :cover_image_thumb_url, :cover_image_show_url | |
def cover_image_thumb_url | |
object.cover_image.url(:thumb) | |
end | |
def cover_image_show_url | |
object.cover_image.url(:show) | |
end | |
def cover_image_url | |
object.cover_image.url() | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment