lib/crimagify/dinamic_image_methods.rb in crimagify-0.0.2.1 vs lib/crimagify/dinamic_image_methods.rb in crimagify-0.0.3.1
- old
+ new
@@ -37,10 +37,16 @@
array_versions.each do |name_size|
size_image = name_size.to_sym
define_method("#{name_size}") do
image = image_url(size_image) rescue ""
if image == ""
- image = "rails.png"
+ if ENV['DEFAULT_IMAGE'].nil?
+ puts ENV['DEFAULT_IMAGE']
+ image = "/crimagify/no_selected.png"
+ else
+ puts ENV['DEFAULT_IMAGE']
+ image = ENV['DEFAULT_IMAGE']
+ end
end
return image
end
end
end
\ No newline at end of file