Commit 71c6ceb2 authored by Eric Davis's avatar Eric Davis

[#324] Rename and update the chiliproject_plugin_controller generator

parent 1477e8b3
......@@ -2,4 +2,4 @@ Description:
Generates a plugin controller.
Example:
./script/generate redmine_plugin_controller MyPlugin Pools index show vote
./script/generate chiliproject_plugin_controller MyPlugin Pools index show vote
require 'rails_generator/base'
require 'rails_generator/generators/components/controller/controller_generator'
class RedminePluginControllerGenerator < ControllerGenerator
class ChiliprojectPluginControllerGenerator < ControllerGenerator
attr_reader :plugin_path, :plugin_name, :plugin_pretty_name
def initialize(runtime_args, runtime_options = {})
runtime_args = runtime_args.dup
usage if runtime_args.empty?
@plugin_name = "redmine_" + runtime_args.shift.underscore
@plugin_name = "chiliproject_" + runtime_args.shift.underscore
@plugin_pretty_name = plugin_name.titleize
@plugin_path = "vendor/plugins/#{plugin_name}"
super(runtime_args, runtime_options)
......
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