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