Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OHR Support
Manage
Activity
Members
Labels
Plan
Issues
97
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
OHR Support
Commits
1477e8b3
Commit
1477e8b3
authored
13 years ago
by
Eric Davis
Browse files
Options
Downloads
Patches
Plain Diff
[
#324
] Rename and update the chiliproject_plugin_model generator
parent
cdb8c680
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/generators/chiliproject_plugin_model/USAGE
+1
-1
1 addition, 1 deletion
lib/generators/chiliproject_plugin_model/USAGE
lib/generators/chiliproject_plugin_model/chiliproject_plugin_model_generator.rb
+2
-2
2 additions, 2 deletions
...oject_plugin_model/chiliproject_plugin_model_generator.rb
with
3 additions
and
3 deletions
lib/generators/chiliproject_plugin_model/USAGE
+
1
−
1
View file @
1477e8b3
...
...
@@ -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
This diff is collapsed.
Click to expand it.
lib/generators/chiliproject_plugin_model/
redmine
_plugin_model_generator.rb
→
lib/generators/chiliproject_plugin_model/
chiliproject
_plugin_model_generator.rb
+
2
−
2
View file @
1477e8b3
require
'rails_generator/base'
require
'rails_generator/generators/components/model/model_generator'
class
Redmine
PluginModelGenerator
<
ModelGenerator
class
Chiliproject
PluginModelGenerator
<
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment