Class: Category

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/category.rb

Class Method Summary collapse

Class Method Details

.categorizable(table) ⇒ Object



9
10
11
# File 'app/models/category.rb', line 9

def categorizable(table)
  Category.has_many_polymorphs :categorizables, :through => :categorizations, :foreign_key => 'category_id', :from => [table]
end