Sha256: c065da210c539a788415d6f9a0db6c2415660447251187c071a9f1c6c5d7b514

Contents?: true

Size: 424 Bytes

Versions: 2

Compression:

Stored size: 424 Bytes

Contents

module ThemesForRails
  module Generators
    class ThemeGenerator < Rails::Generators::NamedBase
      source_root File.expand_path("../templates", __FILE__)
      desc "Creates an empty theme."
      
      def create_theme
        theme_dir = File.join(themes_path, name)
        directory  'theme', theme_dir
      end
    private
      def themes_path
        File.join(Rails.root, "themes")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
themes_for_rails-0.4.1 lib/generators/themes_for_rails/theme_generator.rb
themes_for_rails-0.4.0 lib/generators/themes_for_rails/theme_generator.rb