Class: Merb::Generators::ResourceGenerator

Inherits:
Generator
  • Object
show all
Defined in:
lib/generators/resource.rb

Instance Method Summary collapse

Methods inherited from Generator

#go_up, #initialize, source_root, #with_modules

Methods included from ColorfulMessages

#error, #success, #warning

Constructor Details

This class inherits a constructor from Merb::Generators::Generator

Instance Method Details

#after_generationObject



31
32
33
# File 'lib/generators/resource.rb', line 31

def after_generation
  STDOUT << message("resources :#{model_name.pluralize.snake_case} route added to config/router.rb")
end

#controller_nameObject



23
24
25
# File 'lib/generators/resource.rb', line 23

def controller_name
  name.pluralize
end

#model_nameObject



27
28
29
# File 'lib/generators/resource.rb', line 27

def model_name
  name
end