Sha256: 7fc450e00a73287caa30ea22d431db3261867772a27c15d63b83aa6af63862d9
Contents?: true
Size: 1.07 KB
Versions: 27
Compression:
Stored size: 1.07 KB
Contents
class CmsGenerator < Rails::Generators::Base include Rails::Generators::Migration include Thor::Actions source_root File.expand_path('../../..', __FILE__) def generate_migration migration_template 'db/migrate/01_create_cms.rb', 'db/migrate/create_cms.rb' end def generate_initialization copy_file 'config/initializers/comfortable_mexican_sofa.rb', 'config/initializers/comfortable_mexican_sofa.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}" "#{orm.to_s.camelize}::Generators::Base".constantize.next_migration_number(dirname) end end
Version data entries
27 entries across 27 versions & 1 rubygems