Skip to content

Allows the RRN to perform garbage collection on categories that are no longer referenced by any items

Notifications You must be signed in to change notification settings

rrn/acts_as_sourceable

Repository files navigation

ActsAsSourceable

Allows the RRN to perform garbage project on categories that are no longer referenced.

Installation

In your gemfile

gem 'acts_as_sourceable'

Migration

create_table :acts_as_sourceable_registry do |t|
  t.belongs_to :sourceable, :polymorphic => true
  t.belongs_to :source, :polymorphic => true
  t.timestamps
end

add_index :acts_as_sourceable_registry, [:sourceable_id, :sourceable_type], :name => :index_acts_as_sourceable_sourceables
add_index :acts_as_sourceable_registry, [:source_id, :source_type], :name => :index_acts_as_sourceable_sources

Usage

About

Allows the RRN to perform garbage collection on categories that are no longer referenced by any items

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages