aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails_generator/generators
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails_generator/generators')
-rw-r--r--railties/lib/rails_generator/generators/components/plugin/USAGE4
-rw-r--r--railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb1
-rw-r--r--railties/lib/rails_generator/generators/components/plugin/templates/install.rb1
3 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/rails_generator/generators/components/plugin/USAGE b/railties/lib/rails_generator/generators/components/plugin/USAGE
index e858ada9b9..f033c81442 100644
--- a/railties/lib/rails_generator/generators/components/plugin/USAGE
+++ b/railties/lib/rails_generator/generators/components/plugin/USAGE
@@ -16,6 +16,7 @@ Example:
This will create:
vendor/plugins/browser_filters/README
vendor/plugins/browser_filters/init.rb
+ vendor/plugins/browser_filters/install.rb
vendor/plugins/browser_filters/lib/browser_filters.rb
vendor/plugins/browser_filters/test/browser_filters_test.rb
vendor/plugins/browser_filters/tasks/browser_filters_tasks.rake
@@ -25,9 +26,10 @@ Example:
This will create:
vendor/plugins/browser_filters/README
vendor/plugins/browser_filters/init.rb
+ vendor/plugins/browser_filters/install.rb
vendor/plugins/browser_filters/lib/browser_filters.rb
vendor/plugins/browser_filters/test/browser_filters_test.rb
vendor/plugins/browser_filters/tasks/browser_filters_tasks.rake
vendor/plugins/browser_filters/generators/browser_filters/browser_filters_generator.rb
vendor/plugins/browser_filters/generators/browser_filters/USAGE
- vendor/plugins/browser_filters/generators/browser_filters/templates/ \ No newline at end of file
+ vendor/plugins/browser_filters/generators/browser_filters/templates/
diff --git a/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb b/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb
index 18ac5a1c5c..ea5fdf2b7d 100644
--- a/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb
+++ b/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb
@@ -16,6 +16,7 @@ class PluginGenerator < Rails::Generator::NamedBase
m.template 'README', "#{plugin_path}/README"
m.template 'Rakefile', "#{plugin_path}/Rakefile"
m.template 'init.rb', "#{plugin_path}/init.rb"
+ m.template 'install.rb', "#{plugin_path}/install.rb"
m.template 'plugin.rb', "#{plugin_path}/lib/#{file_name}.rb"
m.template 'tasks.rake', "#{plugin_path}/tasks/#{file_name}_tasks.rake"
m.template 'unit_test.rb', "#{plugin_path}/test/#{file_name}_test.rb"
diff --git a/railties/lib/rails_generator/generators/components/plugin/templates/install.rb b/railties/lib/rails_generator/generators/components/plugin/templates/install.rb
new file mode 100644
index 0000000000..f7732d3796
--- /dev/null
+++ b/railties/lib/rails_generator/generators/components/plugin/templates/install.rb
@@ -0,0 +1 @@
+# Install hook code here