Sha256: bd54ac1aba034f28f420125ed5d7dd854d55b3ba472991c40d5a310fd90736ef

Contents?: true

Size: 389 Bytes

Versions: 4

Compression:

Stored size: 389 Bytes

Contents

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

  def create_service_file
    template('service.rb', File.join('app/services', class_path, "#{file_name}.rb"))
  end

  def generate_locale_file
    if ActiveGenerator::Settings.config.autoload_service_generator_locale
      invoke('locale:service', [name])
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active_generator-4.0.4 lib/generators/service/service_generator.rb
active_generator-4.0.3 lib/generators/service/service_generator.rb
active_generator-4.0.2 lib/generators/service/service_generator.rb
active_generator-4.0.1 lib/generators/service/service_generator.rb