Sha256: b740ac104f6a8d70a3e28a88399306f78bead2fd4445c9ec46fcb1eef513d3c0
Contents?: true
Size: 540 Bytes
Versions: 7
Compression:
Stored size: 540 Bytes
Contents
module Rails module Generators class DecoratorGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) desc <<DESC Description: Stubs out a decorator module in app/decorators directory. Examples: `rails g decorator book` This creates: app/decorators/book_decorator.rb DESC def create_decorator_file template 'decorator.rb', File.join('app/decorators', "#{singular_name}_decorator.rb") end hook_for :test_framework end end end
Version data entries
7 entries across 7 versions & 1 rubygems