Sha256: d05a9141c95c2db0780eb9afbdcb8971ffecf655ccabfee6195c55a4091d8b6b

Contents?: true

Size: 238 Bytes

Versions: 4

Compression:

Stored size: 238 Bytes

Contents

require "active_record"

module Otacrawler
  module Models
    class Author < ActiveRecord::Base
      has_many :writing
      has_many :comics, through: :writing

      validates :name, presence: true, uniqueness: true
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
otacrawler-0.1.3 lib/otacrawler/models/author.rb
otacrawler-0.1.2 lib/otacrawler/models/author.rb
otacrawler-0.1.1 lib/otacrawler/models/author.rb
otacrawler-0.1.0 lib/otacrawler/models/author.rb