mirror of
https://github.com/drapergem/draper
synced 2023-03-27 23:21:17 -04:00
Rename existing generator from draper:model to draper:decorator
This commit is contained in:
parent
6d6ff66091
commit
04fe62db0f
5 changed files with 4 additions and 3 deletions
|
@ -1,7 +1,8 @@
|
|||
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
|
|
@ -1,5 +1,5 @@
|
|||
module Draper
|
||||
class ModelGenerator < Rails::Generators::NamedBase
|
||||
class DecoratorGenerator < Rails::Generators::NamedBase
|
||||
source_root File.expand_path('../templates', __FILE__)
|
||||
|
||||
DECORATORS_ROOT = 'app/decorators/'
|
||||
|
@ -11,7 +11,7 @@ module Draper
|
|||
unless File.exists?(APPLICATION_DECORATOR_PATH)
|
||||
template APPLICATION_DECORATOR, APPLICATION_DECORATOR_PATH
|
||||
end
|
||||
template 'model.rb', "#{DECORATORS_ROOT}#{singular_name}_decorator.rb"
|
||||
template 'decorator.rb', "#{DECORATORS_ROOT}#{singular_name}_decorator.rb"
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue