Skip to content

Commit

Permalink
Merge pull request #202 from masche842/fixes_master
Browse files Browse the repository at this point in the history
Fixes PathNotFound for zoom_picture_path when crop is active
  • Loading branch information
tvdeyen committed Mar 8, 2012
2 parents 2315881 + 5dadd02 commit 45afad5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Expand Up @@ -16,6 +16,7 @@ def crop
if @essence_picture.picture
@content = @essence_picture.content
@options = params[:options] || {}
@options[:format] ||= (configuration(:image_store_format) or 'png')
if @essence_picture.render_size.blank?
if @options[:image_size].blank?
@size_x, @size_y = 0, 0
Expand Down
2 changes: 1 addition & 1 deletion app/views/alchemy/admin/essence_pictures/crop.html.erb
Expand Up @@ -31,7 +31,7 @@

<div id="jscropper">
<%= image_tag(
alchemy.zoom_picture_path(:id => @essence_picture.picture.id, :name => @essence_picture.picture.urlname),
alchemy.zoom_picture_path(:id => @essence_picture.picture.id, :name => @essence_picture.picture.urlname, :format => @options[:format] ),
:id => 'imageToCrop',
:onload => "Alchemy.ImageCropper.init(
[#{@initial_box[:x1]}, #{@initial_box[:y1]}, #{@initial_box[:x2]}, #{@initial_box[:y2]}],
Expand Down

0 comments on commit 45afad5

Please sign in to comment.