more generator goodness

Oleg committed Oct 13, 2010
commit 0119681c8a269e04e8b8c7549817f85d71b3160c
Showing 2 changed files with 22 additions and 0 deletions
generators/README b/lib/generators/README +12 -0
@@ @@ -0,0 +1,12 @@
+ ____ __ _ _ _
+ / ___|___ _ __ ___ / _| ___ _ __| |_ __ _| |__ | | ___
+ | | / _ \| '_ ` _ \| |_ / _ \| '__| __/ _` | '_ \| |/ _ \
+ | |__| (_) | | | | | | _| (_) | | | || (_| | |_) | | __/
+ \____\___/|_| |_| |_|_| \___/|_| \__\__,_|_.__/|_|\___|
+ __ __ _ ____ __
+ | \/ | _____ _(_) ___ __ _ _ __ / ___| ___ / _| __ _
+ | |\/| |/ _ \ \/ / |/ __/ _` | '_ \ \___ \ / _ \| |_ / _` |
+ | | | | __/> <| | (_| (_| | | | | ___) | (_) | _| (_| |
+ |_| |_|\___/_/\_\_|\___\__,_|_| |_| |____/ \___/|_| \__,_|
+
+ Hey, thanks for being AWESOME!
\ No newline at end of file
generators/cms_generator.rb b/lib/generators/cms_generator.rb +10 -0
@@ @@ -9,6 +9,16 @@ class CmsGenerator < Rails::Generators::Base
migration_template 'db/migrate/01_create_cms.rb', 'db/migrate/create_cms.rb'
end
+ def generate_public_assets
+ directory 'public/stylesheets/comfortable_mexican_sofa', 'public/stylesheets/comfortable_mexican_sofa'
+ directory 'public/javascripts/comfortable_mexican_sofa', 'public/javascripts/comfortable_mexican_sofa'
+ directory 'public/images/comfortable_mexican_sofa', 'public/images/comfortable_mexican_sofa'
+ end
+
+ def show_readme
+ readme 'lib/generators/README'
+ end
+
def self.next_migration_number(dirname)
orm = Rails.configuration.generators.options[:rails][:orm]
require "rails/generators/#{orm}"