Sha256: 503519e08d2b677fd25190b354c255058b697c7b4566384211f91f6edfe63d4c

Contents?: true

Size: 562 Bytes

Versions: 9

Compression:

Stored size: 562 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

9 entries across 9 versions & 1 rubygems

Version Path
draper-0.10.0 lib/generators/rails/decorator_generator.rb
draper-0.9.5 lib/generators/rails/decorator_generator.rb
draper-0.9.3 lib/generators/rails/decorator_generator.rb
draper-0.9.2 lib/generators/rails/decorator_generator.rb
draper-0.9.1 lib/generators/rails/decorator_generator.rb
draper-0.9.0 lib/generators/rails/decorator_generator.rb
draper-0.8.1 lib/generators/rails/decorator_generator.rb
draper-0.8.0 lib/generators/rails/decorator_generator.rb
draper-0.7.4 lib/generators/rails/decorator_generator.rb