Sha256: 0fa3fe72a168ed90733be87803137b68c535162de603a386766b1ba00406abb7
Contents?: true
Size: 578 Bytes
Versions: 4
Compression:
Stored size: 578 Bytes
Contents
# frozen_string_literal: true 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', class_path, "#{file_name}_decorator.rb") end hook_for :test_framework end end end
Version data entries
4 entries across 4 versions & 2 rubygems