# encoding: utf-8

class Api::MusicalWorkRepresenter < Api::BaseRepresenter

  property :id
  property :position
  property :title
  property :artist
  property :label
  property :album
  property :year
  property :excerpt_length, as: :length

  def self_url(musical_work)
    polymorphic_path([:api, musical_work.story, musical_work])
  end
end

# encoding: utf-8

class Api::MusicalWorkRepresenter < Api::BaseRepresenter

  property :id
  property :position
  property :title
  property :artist
  property :label
  property :album
  property :year
  property :excerpt_length, as: :duration

  def self_url(musical_work)
    polymorphic_path([:api, musical_work.story, musical_work])
  end
end

Use duration rather than length for musical works
Use duration rather than length for musical works

Having a `length` property does not seem to play well with the front end
