Class: Merb::Generators::ResourceGenerator
- Inherits:
-
Generator
- Object
- Templater::Generator
- Generator
- Merb::Generators::ResourceGenerator
show all
- Defined in:
- lib/generators/resource.rb
Instance Method Summary
collapse
Methods inherited from Generator
#go_up, #initialize, source_root, #with_modules
#error, #success, #warning
Instance Method Details
#after_generation ⇒ Object
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_name ⇒ Object
23
24
25
|
# File 'lib/generators/resource.rb', line 23
def controller_name
name.pluralize
end
|
#model_name ⇒ Object
27
28
29
|
# File 'lib/generators/resource.rb', line 27
def model_name
name
end
|