Commit 2aae157c67267da861fc62cf0043287146f34681

Authored by Victor Costa
1 parent 46a6f863

rails3: fix active record for plugins

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
lib/noosfero/plugin/active_record.rb
1 1 class Noosfero::Plugin::ActiveRecord < ActiveRecord::Base
2   - def self.table_name
3   - self.name.gsub('::','_').underscore.pluralize
  2 +
  3 + def self.inherited(child)
  4 + self.table_name = child.name.gsub('::','_').underscore.pluralize
4 5 end
  6 +
5 7 end
... ...