comfy-admin-constructor 0.3.9 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -33,16 +33,16 @@ class CmsAdminGenerator < Rails::Generators::Base
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def create_controller
|
36
|
-
template 'controller.rb', "app/controllers/#{admin_prefix}/#{plural_name}_controller.rb"
|
36
|
+
template 'controller.rb', "app/controllers/#{admin_prefix.underscore}/#{plural_name}_controller.rb"
|
37
37
|
end
|
38
38
|
|
39
39
|
def create_form
|
40
|
-
template "views/_form#{template_file_type}", "app/views/#{admin_prefix}/#{plural_name}/_form#{template_file_type}"
|
40
|
+
template "views/_form#{template_file_type}", "app/views/#{admin_prefix.underscore}/#{plural_name}/_form#{template_file_type}"
|
41
41
|
end
|
42
42
|
|
43
43
|
def create_views
|
44
44
|
%w[edit index new].each do |action|
|
45
|
-
template "views/#{action}#{template_file_type}", "app/views/#{admin_prefix}/#{plural_name}/#{action}#{template_file_type}"
|
45
|
+
template "views/#{action}#{template_file_type}", "app/views/#{admin_prefix.underscore}/#{plural_name}/#{action}#{template_file_type}"
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|