Class: Rails::Generators::ResourceGenerator

Inherits:
ModelGenerator show all
Includes:
ResourceHelpers
Defined in:
railties/lib/rails/generators/rails/resource/resource_generator.rb

Overview

:nodoc:

Direct Known Subclasses

ScaffoldGenerator

Constant Summary

Constants included from ModelHelpers

ModelHelpers::INFLECTION_IMPOSSIBLE_ERROR_MESSAGE, ModelHelpers::IRREGULAR_MODEL_NAME_WARN_MESSAGE, ModelHelpers::PLURAL_MODEL_NAME_WARN_MESSAGE

Class Method Summary collapse

Methods included from ResourceHelpers

included, #initialize

Methods included from ModelHelpers

included, #initialize

Class Method Details

.desc(description = nil) ⇒ Object



21
22
23
# File 'railties/lib/rails/generators/rails/resource/resource_generator.rb', line 21

def desc(description = nil)
  ERB.new(File.read(usage_path)).result(binding)
end