Sha256: b2041b430061a4454d23911831fa43169ae7cc3ac1a1f3d35925f6e632cfadde

Contents?: true

Size: 207 Bytes

Versions: 22

Compression:

Stored size: 207 Bytes

Contents

# frozen_string_literal: true

class Category < ActiveRecord::Base
  has_many :posts, inverse_of: :category
  has_many :entries

  has_many :users

  def draft_post
    posts.draft.first_or_create
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
bullet-7.0.7 spec/models/category.rb
bullet-7.0.6 spec/models/category.rb
bullet-7.0.5 spec/models/category.rb
bullet-7.0.4 spec/models/category.rb
bullet-7.0.3 spec/models/category.rb
bullet-7.0.2 spec/models/category.rb
bullet-7.0.1 spec/models/category.rb
bullet-7.0.0 spec/models/category.rb
bullet-6.1.5 spec/models/category.rb
bullet-6.1.4 spec/models/category.rb
bullet-6.1.3 spec/models/category.rb
bullet-6.1.2 spec/models/category.rb
bullet-6.1.1 spec/models/category.rb
bullet-6.1.0 spec/models/category.rb
bullet-6.0.2 spec/models/category.rb
bullet-6.0.1 spec/models/category.rb
bullet-6.0.0 spec/models/category.rb
bullet-5.9.0 spec/models/category.rb
bullet-5.8.1 spec/models/category.rb
bullet-5.8.0 spec/models/category.rb