Commit 1477e8b3 authored by Eric Davis's avatar Eric Davis

[#324] Rename and update the chiliproject_plugin_model generator

parent cdb8c680
......@@ -2,4 +2,4 @@ Description:
Generates a plugin model.
Examples:
./script/generate redmine_plugin_model MyPlugin pool title:string question:text
./script/generate chiliproject_plugin_model MyPlugin pool title:string question:text
require 'rails_generator/base'
require 'rails_generator/generators/components/model/model_generator'
class RedminePluginModelGenerator < ModelGenerator
class ChiliprojectPluginModelGenerator < ModelGenerator
attr_accessor :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