Class: ContentmentViewsGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



6
7
8
# File 'lib/generators/contentment_views_generator.rb', line 6

def self.source_root
  File.join(File.dirname(__FILE__), 'contentment/contentment_views_templates')
end

Instance Method Details

#installObject



10
11
12
13
14
# File 'lib/generators/contentment_views_generator.rb', line 10

def install
  puts "Installing Views"
  template 'contents_helper.rb', 'app/helpers/contents_helper.rb'
  directory 'contents', 'app/views/contents'
end