Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Paperclip::Style. Much more efficient initialization in case of strin…
Browse files Browse the repository at this point in the history
…g definition.
  • Loading branch information
DanielVartanov committed Oct 4, 2011
1 parent 7f523e3 commit ba18631
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/paperclip/style.rb
Expand Up @@ -19,6 +19,10 @@ def initialize name, definition, attachment
@format = definition.delete(:format)
@processors = definition.delete(:processors)
@other_args = definition
elsif definition.is_a? String
@geometry = definition
@format = nil
@other_args = {}
else
@geometry, @format = [definition, nil].flatten[0..1]
@other_args = {}
Expand Down

0 comments on commit ba18631

Please sign in to comment.