Skip to content

Commit

Permalink
"process_to_limit" => "resize_to_limit"
Browse files Browse the repository at this point in the history
Fixes #15
  • Loading branch information
janko committed Nov 23, 2015
1 parent 3ab14cb commit c8f9257
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -264,7 +264,7 @@ class ImageUploader < Shrine

def process(io, context)
if context[:phase] == :store
process_to_limit!(io.download, 700, 700)
resize_to_limit!(io.download, 700, 700)
end
end
end
Expand Down Expand Up @@ -294,9 +294,9 @@ class ImageUploader < Shrine

def process(io, context)
if context[:phase] == :store
size_700 = process_to_limit!(io.download, 700, 700)
size_500 = process_to_limit!(size_700, 500, 500)
size_300 = process_to_limit!(size_500, 300, 300)
size_700 = resize_to_limit!(io.download, 700, 700)
size_500 = resize_to_limit!(size_700, 500, 500)
size_300 = resize_to_limit!(size_500, 300, 300)

{large: size_700, medium: size_500, small: size_300}
end
Expand Down
6 changes: 3 additions & 3 deletions lib/shrine/plugins/versions.rb
Expand Up @@ -8,9 +8,9 @@ module Plugins
#
# def process(io, context)
# if context[:phase] == :store
# size_700 = process_to_limit!(io.download, 700, 700)
# size_500 = process_to_limit!(size_700, 500, 500)
# size_300 = process_to_limit!(size_500, 300, 300)
# size_700 = resize_to_limit!(io.download, 700, 700)
# size_500 = resize_to_limit!(size_700, 500, 500)
# size_300 = resize_to_limit!(size_500, 300, 300)
#
# {large: size_700, medium: size_500, small: size_300}
# end
Expand Down

0 comments on commit c8f9257

Please sign in to comment.