Sha256: 72a05813921c1ea7a9202d4a23d972e57f30dc6a9d98bcfadc54d1f367803192

Contents?: true

Size: 516 Bytes

Versions: 32

Compression:

Stored size: 516 Bytes

Contents

# encoding: utf-8

module Merb
  module Generators
    class UploaderGenerator < NamedGenerator

      def self.source_root
        File.join(File.dirname(__FILE__), '..', '..', 'rails_generators', 'uploader', 'templates')
      end

      first_argument :name, :required => true, :desc => "The name of this uploader"

      template :uploader do |t|
        t.source = 'uploader.rb'
        t.destination = "app/uploaders/#{file_name}_uploader.rb"
      end
    end

    add :uploader, UploaderGenerator

  end
end

Version data entries

32 entries across 32 versions & 7 rubygems

Version Path
andrewtimberlake-carrierwave-0.3.2.1 lib/generators/uploader_generator.rb
durran-carrierwave-0.3.2.3 lib/generators/uploader_generator.rb
jnicklas-carrierwave-0.3.2.1 lib/generators/uploader_generator.rb
jnicklas-carrierwave-0.3.2 lib/generators/uploader_generator.rb
jnicklas-carrierwave-0.3.3 lib/generators/uploader_generator.rb
thorsson_carrierwave-0.4.12 merb_generators/uploader_generator.rb
thorsson_carrierwave-0.4.11 merb_generators/uploader_generator.rb
thorsson_carrierwave-0.4.10 merb_generators/uploader_generator.rb
thorsson_carrierwave-0.4.9 merb_generators/uploader_generator.rb
thorsson_carrierwave-0.4.8 merb_generators/uploader_generator.rb
thorsson_carrierwave-0.4.6 merb_generators/uploader_generator.rb
thorsson_carrierwave-0.4.5 merb_generators/uploader_generator.rb
carrierwave-0.4.10 merb_generators/uploader_generator.rb
samlown-carrierwave-0.4.5 merb_generators/uploader_generator.rb
dsturnbull-carrierwave-0.4.9 merb_generators/uploader_generator.rb
dsturnbull-carrierwave-0.4.8 merb_generators/uploader_generator.rb
dsturnbull-carrierwave-0.4.7 merb_generators/uploader_generator.rb
carrierwave-0.4.5 merb_generators/uploader_generator.rb
dsturnbull-carrierwave-0.4.6 merb_generators/uploader_generator.rb
dsturnbull-carrierwave-0.4.5 merb_generators/uploader_generator.rb