drysql 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/base.rb +7 -3
- metadata +7 -7
data/lib/base.rb
CHANGED
@@ -92,9 +92,9 @@ module ActiveRecord
|
|
92
92
|
@associations ? @associations : {}
|
93
93
|
end
|
94
94
|
|
95
|
-
def table_exists?(
|
96
|
-
|
97
|
-
connection.tables.include?
|
95
|
+
def table_exists?(class_name=nil)
|
96
|
+
if connection.respond_to?(:tables)
|
97
|
+
connection.tables.include? construct_table_name_from_class_name(class_name)
|
98
98
|
else
|
99
99
|
false
|
100
100
|
end
|
@@ -134,6 +134,10 @@ module ActiveRecord
|
|
134
134
|
def pluralized_symbolized_class_name_from_table_name(table_name)
|
135
135
|
(class_name(table_name)).downcaseFirstLetter.pluralize.to_sym
|
136
136
|
end
|
137
|
+
|
138
|
+
def construct_table_name_from_class_name(class_name)
|
139
|
+
name = "#{table_name_prefix}#{undecorated_table_name(class_name)}#{table_name_suffix}"
|
140
|
+
end
|
137
141
|
|
138
142
|
end #end class << self (Class Methods)
|
139
143
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: drysql
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date: 2006-
|
6
|
+
version: 0.1.5
|
7
|
+
date: 2006-12-05 00:00:00 -05:00
|
8
8
|
summary: Dynamic, Reflective, Invisible Object-Relational Mapping for Ruby
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -28,17 +28,17 @@ cert_chain:
|
|
28
28
|
authors:
|
29
29
|
- Bryan Evans
|
30
30
|
files:
|
31
|
-
- lib/
|
32
|
-
- lib/base.rb
|
31
|
+
- lib/validations.rb
|
33
32
|
- lib/dependencies.rb
|
33
|
+
- lib/associations.rb
|
34
34
|
- lib/drysql.rb
|
35
|
-
- lib/
|
35
|
+
- lib/base.rb
|
36
36
|
- lib/helpers/string.rb
|
37
|
-
- lib/connection_adapters/
|
37
|
+
- lib/connection_adapters/postgresql_adapter.rb
|
38
38
|
- lib/connection_adapters/mysql_adapter.rb
|
39
39
|
- lib/connection_adapters/oracle_adapter.rb
|
40
|
-
- lib/connection_adapters/postgresql_adapter.rb
|
41
40
|
- lib/connection_adapters/sqlserver_adapter.rb
|
41
|
+
- lib/connection_adapters/abstract_adapter.rb
|
42
42
|
- lib/connection_adapters/abstract/schema_definitions.rb
|
43
43
|
- README
|
44
44
|
test_files: []
|