lib/attach_it/attachment_options.rb in mm-attach-it-0.2.1 vs lib/attach_it/attachment_options.rb in mm-attach-it-0.2.2

- old
+ new

@@ -112,9 +112,12 @@ result.gsub!(/\:style/, style_name.to_s) result.gsub!(/\:id/, @object_id) result.gsub!(/\:class/, @class_name) result.gsub!(/\:attachment/, @attachment) result.gsub!(/(\/){2,}/, '/') + while result.match(/:model\.([A-Za-z\_]+)/) + result.sub!(/:model\.[A-Za-z\_]+/, @model.send($1)) + end result end def set_storage(storage_option = nil) storage_option = 'filesystem' if storage_option.nil?