Class: Pageflow::Generators::ThemeGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/pageflow/theme/theme_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_templateObject



15
16
17
18
19
20
21
# File 'lib/generators/pageflow/theme/theme_generator.rb', line 15

def copy_template
  directory('themes', File.join('app', 'assets', 'stylesheets', 'pageflow', 'themes'))
  empty_directory(File.join('app', 'assets', 'images', 'pageflow', 'themes', name))
  copy_file('preview.png', "app/assets/images/pageflow/themes/#{name}/preview.png")
  copy_file('preview_thumbnail.png',
            "app/assets/images/pageflow/themes/#{name}/preview_thumbnail.png")
end