Class: Rails::Generators::ResourceGenerator

Inherits:
ModelGenerator show all
Includes:
ResourceHelpers
Defined in:
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

Methods inherited from NamedBase

#initialize

Methods inherited from Base

base_root, class_option, default_source_root, exit_on_failure?, hide!, hook_for, inherited, namespace, remove_hook_for, source_root

Methods included from Actions

#add_source, #environment, #gem, #gem_group, #generate, #git, #github, #initialize, #initializer, #lib, #rails_command, #rake, #rakefile, #readme, #route, #vendor

Class Method Details

.desc(description = nil) ⇒ Object



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

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