diff --git a/lib/noosfero/plugin/active_record.rb b/lib/noosfero/plugin/active_record.rb index f7769ed..563371b 100644 --- a/lib/noosfero/plugin/active_record.rb +++ b/lib/noosfero/plugin/active_record.rb @@ -1,5 +1,7 @@ class Noosfero::Plugin::ActiveRecord < ActiveRecord::Base - def self.table_name - self.name.gsub('::','_').underscore.pluralize + + def self.inherited(child) + self.table_name = child.name.gsub('::','_').underscore.pluralize end + end -- libgit2 0.21.2