Class: ClearanceViewsGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



4
5
6
# File 'lib/rails/generators/clearance_views_generator.rb', line 4

def self.source_root
  @_clearance_source_root ||= File.join(File.dirname(__FILE__), "clearance_views_templates")
end

Instance Method Details

#installObject



8
9
10
11
12
13
# File 'lib/rails/generators/clearance_views_generator.rb', line 8

def install
  strategy          = "formtastic"
  template_strategy = "erb"

  directory "#{strategy}/#{template_strategy}", "app/views"
end