Sha256: 5dce91b97ddc15c6c535c424e7eb48f97826ad5e2d2157497392f39ae70400a7

Contents?: true

Size: 557 Bytes

Versions: 2

Compression:

Stored size: 557 Bytes

Contents

require File.expand_path('../../draper/decorator/decorator_generator.rb', __FILE__)
class Rails::DecoratorGenerator < Draper::DecoratorGenerator

  source_root File.expand_path('../../draper/decorator/templates', __FILE__)

  class_option :invoke_after_finished, :type => :string, :description => "Generator to invoke when finished"

  def build_model_and_application_decorators
    super
    if self.options[:invoke_after_finished]
      Rails::Generators.invoke(self.options[:invoke_after_finished], [@name, @_initializer.first[1..-1]])
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
draper-0.11.1 lib/generators/rails/decorator_generator.rb
draper-0.11.0 lib/generators/rails/decorator_generator.rb