Sha256: 9b06162af0c888ffedfdd792579fdb6bfaea1fd9e0ad9f3f6d6233169eefb733

Contents?: true

Size: 673 Bytes

Versions: 3

Compression:

Stored size: 673 Bytes

Contents

require 'rails/generators/rails/helper/helper_generator'

module Helper
  class ScaffoldhubGenerator < Rails::Generators::HelperGenerator

    include Scaffoldhub::Helper

    class_option :scaffold, :default => 'default', :banner => "SCAFFOLD_NAME",  :type => :string,  :desc => "Scaffold to use"
    class_option :local,    :default => false,     :banner => "LOCAL SCAFFOLD", :type => :boolean, :desc => "Use a local scaffold, not scaffoldhub.org"

    def create_helper_files
      each_template_file(:helper) do |helper_template_file|
        template helper_template_file.src, File.join("app/helpers", class_path, "#{file_name}_helper.rb")
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
scaffoldhub-0.1.3 lib/generators/helper/scaffoldhub_generator.rb
scaffoldhub-0.1.2 lib/generators/helper/scaffoldhub_generator.rb
scaffoldhub-0.1.1 lib/generators/helper/scaffoldhub_generator.rb