Sha256: 065a43dc098ca18362a22c1d12eabba768d9d41d2fc06bb8de7a7ad7d88eea27
Contents?: true
Size: 426 Bytes
Versions: 4
Compression:
Stored size: 426 Bytes
Contents
module Carload module ApplicationHelper def needs_upload? model_name, attribute_name case Carload.upload_solution when :carrierwave model_class = model_name.to_s.classify.constantize not model_class.instance_methods.map(&:to_s).select { |x| x =~ /#{attribute_name}_url/ }.empty? end end def image? attribute_name attribute_name.to_s =~ /image|logo|img/ end end end
Version data entries
4 entries across 4 versions & 1 rubygems