Class: Essay::AttributeFeatures::HasCarrierWaveUploader

Inherits:
Base
  • Object
show all
Defined in:
lib/essay-carrierwave/attribute.rb

Instance Method Summary collapse

Instance Method Details

#mounted_asObject

class Article

mount_uploader :poster, PosterUploader

end

Article.attribute_features.carrierwave.mounted_as => :poster



43
44
45
# File 'lib/essay-carrierwave/attribute.rb', line 43

def mounted_as
  top_feature.accessor_for(this_attribute.name)
end

#uploaderObject

class Article

mount_uploader :poster, PosterUploader

end

Article.attribute_features.carrierwave.uploader => PosterUploader



33
34
35
# File 'lib/essay-carrierwave/attribute.rb', line 33

def uploader
  top_feature.uploader_for(this_attribute.name)
end