Sha256: 7620846396330bdd2c8e3f090bd7c913cac19ee676a8914e8db025c219dd9e1c

Contents?: true

Size: 497 Bytes

Versions: 8

Compression:

Stored size: 497 Bytes

Contents

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

8 entries across 8 versions & 2 rubygems

Version Path
jnicklas-carrierwave-0.2.3 lib/generators/uploader_generator.rb
jnicklas-carrierwave-0.2.4 lib/generators/uploader_generator.rb
jnicklas-carrierwave-0.3.0 lib/generators/uploader_generator.rb
jnicklas-carrierwave-0.3.1 lib/generators/uploader_generator.rb
carrierwave-0.3.0 lib/generators/uploader_generator.rb
carrierwave-0.3.1 lib/generators/uploader_generator.rb
carrierwave-0.2.4 lib/generators/uploader_generator.rb
carrierwave-0.2.3 lib/generators/uploader_generator.rb