lib/artwork/view.rb in artwork-0.1.1 vs lib/artwork/view.rb in artwork-0.2.0

- old
+ new

@@ -1,6 +1,15 @@ module Artwork module View + def activate_resolution_independence + content_tag :script do + Thread.current[:artwork_script] ||= begin + artwork_script_path = Artwork.root_path + '/assets/javascripts/artwork.js' + Uglifier.compile(File.read(artwork_script_path)).html_safe + end + end + end + def artwork_tag(record, attachment_name, size, options = {}) image_tag_options = options[:image] || {} img_holder_options = options[:img_holder] || {} image_tag_options[:alt] ||= extract_title_from(record)