Sha256: c091415aee83715f3de5181a050caa3e65826136338463ffdb631e7d18f8d451

Contents?: true

Size: 292 Bytes

Versions: 7

Compression:

Stored size: 292 Bytes

Contents

# frozen_string_literal: true

class Project < ActiveRecord::Base
  acts_as_resource parent_as: :resource
  belongs_to :resource, foreign_key: :parent_id
  has_one :status

  after_create :create_status

  def create_status
    Status.create(project: self, name: 'Monarchy is OK!')
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
monarchy-2.7.0 dummy/app/models/project.rb
monarchy-2.6.1 dummy/app/models/project.rb
monarchy-2.6.0 dummy/app/models/project.rb
monarchy-2.5.0 dummy/app/models/project.rb
monarchy-2.4.0 dummy/app/models/project.rb
monarchy-2.3.0 dummy/app/models/project.rb
monarchy-2.2.2 dummy/app/models/project.rb