comma-heaven 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/comma-heaven/sqler/columns.rb +6 -1
- metadata +4 -4
@@ -32,7 +32,12 @@ module CommaHeaven
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def table_alias(method = :pluralize)
|
35
|
-
|
35
|
+
case method
|
36
|
+
when :pluralize
|
37
|
+
return [((parent && parent.parent) ? parent.table_alias(method) : nil), table, index].compact.join('_')
|
38
|
+
when :singularize
|
39
|
+
return [((parent && parent.parent) ? parent.table_alias(method) : nil), model.name.underscore, index].compact.join('_')
|
40
|
+
end
|
36
41
|
end
|
37
42
|
|
38
43
|
protected
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comma-heaven
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Silvano Stralla
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-10-22 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|