Class: Ajax::Generators::Base

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

Direct Known Subclasses

ModelGenerator

Class Method Summary collapse

Class Method Details

.source_rootObject

Automatically sets the source root based on the class name.



8
9
10
11
12
# File 'lib/generators/ajax/base.rb', line 8

def self.source_root
  @_ajax_source_root ||= begin
    File.expand_path(File.join(File.dirname(__FILE__), generator_name, 'templates')) if generator_name
  end
end