clekstro/cc_licenseable

View on GitHub
lib/cc_licenseable.rb

Summary

Maintainability
A
0 mins
Test Coverage
require "cc_licenseable/engine"

module CcLicenseable
  def self.included(base)
    base.extend(ClassMethods)
  end

  module ClassMethods
    def cc_licenseable
      belongs_to :cc_license, class_name: "CcLicenseable::CcLicense"
    end
  end
end

ActiveRecord::Base.send(:include, CcLicenseable)