aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2011-04-24 19:56:25 +0800
committerJosé Valim <jose.valim@gmail.com>2011-04-25 15:30:58 +0800
commita1c31eca47f19b14161b275ad6432da562a11438 (patch)
treee7c2f9dd5ee60d714007a120586864d8e8d71900 /railties/lib
parent05ce0007db9361a2b777bc7378e395dafb199fd3 (diff)
downloadrails-a1c31eca47f19b14161b275ad6432da562a11438.tar.gz
rails-a1c31eca47f19b14161b275ad6432da562a11438.tar.bz2
rails-a1c31eca47f19b14161b275ad6432da562a11438.zip
Add `app/assets/images` directory to plugin new generator
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb
index 12921f47b6..5abb8d0e35 100644
--- a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb
+++ b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb
@@ -135,6 +135,12 @@ task :default => :test
end
end
+ def images
+ if mountable? || full?
+ empty_directory_with_gitkeep "app/assets/images"
+ end
+ end
+
def script(force = false)
directory "script", :force => force do |content|
"#{shebang}\n" + content
@@ -199,6 +205,10 @@ task :default => :test
build(:javascripts)
end
+ def create_images_directory
+ build(:images)
+ end
+
def create_script_files
build(:script)
end