Commit 5e598a71

mo k <mo@mokhan.ca>
2012-08-17 15:33:27
display the thumbnail using the right size on the crop page and display the 'large' version on the crop page.
1 parent 8c1ad76
Changed files (2)
app
uploaders
views
creations
app/uploaders/image_uploader.rb
@@ -24,11 +24,11 @@ class ImageUploader < CarrierWave::Uploader::Base
   # Create different versions of your uploaded files:
   version :large do 
     process :manualcrop
-    process :resize_to_fill => [1170, 810]
+    process :resize_to_fill => [910, 630]
     process :watermark
   end
 
-  version :thumb do
+  version :thumb, :from_version => :thumb do
     process :manualcrop
     process :resize_to_fill => [260, 180]
   end
app/views/creations/crop.html.erb
@@ -1,6 +1,6 @@
 <% content_for :head do %>
   <style type="text/css">
-    .preview { width:210px; height:150px; overflow:hidden; }
+    .preview { width:260px; height:180px; overflow:hidden; }
     .jcrop img { max-width:none; }
   </style>
   <script type="text/javascript" charset="utf-8">
@@ -18,7 +18,7 @@
 <div class="row">
   <div class="span9 jcrop">
     <h3>Do you want to crop the image as well?</h3>
-    <%= image_tag @creation.image_url, :id => "cropbox" %>
+    <%= image_tag @creation.image_url(:large), :id => "cropbox" %>
   </div>
   <div class="span3 jcrop">
     <h3>Crop Preview</h3>