From bfccd16de6e8924e0d24e0b5f77ecb3ca77409fc Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Sun, 21 Sep 2014 13:48:11 -0300 Subject: [PATCH] Use table_prefix_name for plugins' table_name --- lib/noosfero/plugin.rb | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/lib/noosfero/plugin.rb b/lib/noosfero/plugin.rb index 3bc34e9..acd897e 100644 --- a/lib/noosfero/plugin.rb +++ b/lib/noosfero/plugin.rb @@ -12,6 +12,12 @@ class Noosfero::Plugin attr_writer :should_load + # Called for each ActiveRecord class with parents + # See http://apidock.com/rails/ActiveRecord/ModelSchema/ClassMethods/full_table_name_prefix + def table_name_prefix + @table_name_prefix ||= "#{name.to_s.underscore}_" + end + def should_load @should_load.nil? && true || @boot end -- libgit2 0.21.2