nilbus/handoff

View on GitHub
app/models/annotation.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Annotation < ActiveRecord::Base
  belongs_to :handoff
  belongs_to :author, class_name: 'User'

  scope :sequential, ->{ order(:id) }

  def author_name
    author.name
  end

  def template?
    resource_id.nil?
  end
end