2015-10-01 11:56:40 -04:00
|
|
|
class Link < ActiveRecord::Base
|
2015-10-09 16:45:53 -04:00
|
|
|
has_paper_trail
|
|
|
|
|
2015-10-06 13:55:12 -04:00
|
|
|
has_and_belongs_to_many :cards
|
|
|
|
|
2015-10-01 11:56:40 -04:00
|
|
|
validates :name, presence: true,
|
|
|
|
uniqueness: true
|
2015-10-08 13:08:45 -04:00
|
|
|
|
|
|
|
default_scope { order(:name) }
|
2015-11-03 16:15:20 -05:00
|
|
|
|
|
|
|
def self.issues
|
|
|
|
Link.where(description: nil)
|
|
|
|
end
|
2015-10-01 11:56:40 -04:00
|
|
|
end
|