Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

141 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Packages

Used by

Contributors

Languages