irm_yaml_db 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/irm_yaml_db.gemspec +1 -1
- data/lib/serialization_helper.rb +7 -2
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/irm_yaml_db.gemspec
CHANGED
data/lib/serialization_helper.rb
CHANGED
@@ -172,11 +172,16 @@ module SerializationHelper
|
|
172
172
|
end
|
173
173
|
|
174
174
|
def self.base_tables
|
175
|
-
|
175
|
+
|
176
|
+
sql = "select table_name from information_schema.tables where table_schema='#{database}' and table_type='base table';"
|
176
177
|
base_tables = ActiveRecord::Base.connection.execute(sql, 'SCHEMA').collect do |field|
|
177
178
|
field.first
|
178
179
|
end
|
179
|
-
base_tables.reject { |table| ['schema_info', 'schema_migrations'
|
180
|
+
base_tables.reject { |table| ['schema_info', 'schema_migrations'].include?(table) }
|
181
|
+
end
|
182
|
+
|
183
|
+
def self.database
|
184
|
+
Rails.configuration.database_configuration[Rails.env]["database"]
|
180
185
|
end
|
181
186
|
|
182
187
|
def self.tables
|