Sha256: 42a4136d1dfefbd1bf42c6d1a32e984d87c180c05ee34df7bce165485f91fd85

Contents?: true

Size: 278 Bytes

Versions: 10

Compression:

Stored size: 278 Bytes

Contents

module Draper
  class ModelGenerator < Rails::Generators::NamedBase
    source_root File.expand_path('../templates', __FILE__)

    def build_model
      empty_directory "app/decorators"
      template 'model.rb', "app/decorators/#{singular_name}_decorator.rb"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
draper-0.5.0 lib/generators/draper/model/model_generator.rb
draper-0.4.2 lib/generators/draper/model/model_generator.rb
draper-0.4.1.1 lib/generators/draper/model/model_generator.rb
draper-0.4.1 lib/generators/draper/model/model_generator.rb
draper-0.4.0 lib/generators/draper/model/model_generator.rb
draper-0.3.5 lib/generators/draper/model/model_generator.rb
draper-0.3.4 lib/generators/draper/model/model_generator.rb
draper-0.3.3 lib/generators/draper/model/model_generator.rb
draper-0.3.2 lib/generators/draper/model/model_generator.rb
draper-0.3.1 lib/generators/draper/model/model_generator.rb