Permalink
Browse files

Renaming original decorator generator from draper:model to draper:dec…

…orator
  • Loading branch information...
1 parent 9b03198 commit 4eb2b7cb124feb44f0c00efd07f9fc5c5b95a181 @jcasimir jcasimir committed Aug 17, 2011
View
3 lib/draper.rb
@@ -1,8 +1,7 @@
-require 'draper/version'
+require "draper/version"
require 'draper/system'
require 'draper/all_helpers'
require 'draper/base'
require 'draper/lazy_helpers'
-require 'draper/railtie'
Draper::System.setup
View
0 lib/generators/draper/decorator/USAGE → lib/generators/draper/model/USAGE
File renamed without changes.
View
4 ...s/draper/decorator/decorator_generator.rb → ...enerators/draper/model/model_generator.rb
@@ -1,5 +1,5 @@
module Draper
- class DecoratorGenerator < Rails::Generators::NamedBase
+ class ModelGenerator < Rails::Generators::NamedBase
source_root File.expand_path('../templates', __FILE__)
DECORATORS_ROOT = 'app/decorators/'
@@ -11,7 +11,7 @@ def build_model_and_application_decorators
unless File.exists?(APPLICATION_DECORATOR_PATH)
template APPLICATION_DECORATOR, APPLICATION_DECORATOR_PATH
end
- template 'decorator.rb', "#{DECORATORS_ROOT}#{singular_name}_decorator.rb"
+ template 'model.rb', "#{DECORATORS_ROOT}#{singular_name}_decorator.rb"
end
end
end
View
0 ...orator/templates/application_decorator.rb → .../model/templates/application_decorator.rb
File renamed without changes.
View
0 ...s/draper/decorator/templates/decorator.rb → ...enerators/draper/model/templates/model.rb
File renamed without changes.

0 comments on commit 4eb2b7c

Please sign in to comment.