       cache.getHash @key, {}, (err, data) =>
         if data and @cache
           return resolve @rails = data
-
-        # fetch artwork
-        # if theres an auction return sale_artworks also
-          # if the auction is current, resolve with works
-          # else add works to existing ids
-        # if the work is in a fair, fetch all other works in the show (excluding existing works)
-        # if the work is in a show, fetch all other works in the show (excluding existing works)
-        # fetch works in the same category, if over 20 add works to rails and excluded ids
-        # fetch works by artist, add to rails
-        # fetch works by partner, add to rails
 
         @fetchArtwork()
         .then ({ @artwork }) =>

              @assignRail 'closed_auction_artworks', artworks.toJSON()
            else
              @assignRail 'current_auction_artworks', artworks.toJSON()

        resolve()
      else
        resolve()

  fetchShowArtworks: ->
    console.log 'show'
    Q.promise (resolve) =>
      if @artwork.shows.length
        partner = new Partner id: @artwork.shows[0].partner.id

        resolve()

  fetchSimilarArtworks: ->
    @fetchFilterArtworks 'similar_artworks',
      gene_id: slugify(@artwork.category)
      artist_id: @artwork.artist.id
      size: 20

  fetchArtistArtworks: ->
    @fetchFilterArtworks 'artist_artworks',
      artist_id: @artwork.artist.id

  fetchPartnerArtworks: ->
    @fetchFilterArtworks 'partner_artworks',
      partner_id: @artwork.partner.id

  fetchFilterArtworks: (id, options)->
    Q.promise (resolve) =>
      artworks = new FilterArtworks []
      artworks.fetch
        data: @prepareParams options
        error: resolve
        success: (collection, response) =>
          @assignRail id, collection.toJSON()
          resolve()

  fetchArtwork: ->
    metaphysics
