newplugin 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -15,10 +15,10 @@ class ModelGenerator < RubiGen::Base
|
|
15
15
|
@attributes << {:type => x.split(/:/)[1],:name => x.split(/:/)[0]}
|
16
16
|
end
|
17
17
|
|
18
|
-
@file_name = @name.
|
18
|
+
@file_name = @name.singularize.underscore
|
19
19
|
@class_name = @name.singularize.classify
|
20
|
-
@class_path = File.dirname(
|
21
|
-
@table_name =
|
20
|
+
@class_path = File.dirname(file_name)
|
21
|
+
@table_name = @name.pluralize.underscore.gsub(/\//, '_').pluralize
|
22
22
|
end
|
23
23
|
|
24
24
|
def manifest
|
data/lib/newplugin.rb
CHANGED