Commit 1100fdcc authored by jplang's avatar jplang
Browse files

Code cleanup (#24007).

git-svn-id: https://svn.redmine.org/redmine/trunk@15964 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 5eebdbb1
......@@ -7,12 +7,7 @@ class RedminePluginGenerator < Rails::Generators::NamedBase
super
@plugin_name = file_name.underscore
@plugin_pretty_name = plugin_name.titleize
if Redmine::Configuration['plugins_path'].nil?
@plugin_path = File.join(Rails.root, 'plugins', plugin_name)
else
@plugin_path = File.join(Redmine::Configuration['plugins_path'], plugin_name)
end
puts @plugin_path
@plugin_path = File.join(Redmine::Plugin.directory, plugin_name)
end
def copy_templates
......
......@@ -9,11 +9,7 @@ class RedminePluginControllerGenerator < Rails::Generators::NamedBase
super
@plugin_name = file_name.underscore
@plugin_pretty_name = plugin_name.titleize
if Redmine::Configuration['plugins_path'].nil?
@plugin_path = File.join(Rails.root, 'plugins', plugin_name)
else
@plugin_path = File.join(Redmine::Configuration['plugins_path'], plugin_name)
end
@plugin_path = File.join(Redmine::Plugin.directory, plugin_name)
@controller_class = controller.camelize
end
......
......@@ -14,11 +14,7 @@ class RedminePluginModelGenerator < Rails::Generators::NamedBase
super
@plugin_name = file_name.underscore
@plugin_pretty_name = plugin_name.titleize
if Redmine::Configuration['plugins_path'].nil?
@plugin_path = File.join(Rails.root, 'plugins', plugin_name)
else
@plugin_path = File.join(Redmine::Configuration['plugins_path'], plugin_name)
end
@plugin_path = File.join(Redmine::Plugin.directory, plugin_name)
@model_class = model.camelize
@table_name = @model_class.tableize
@migration_filename = "create_#{@table_name}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment