Module: WpTimthumb::Existable

Included in:
WpTimthumb
Defined in:
lib/common/models/wp_timthumb/existable.rb

Instance Method Summary collapse

Instance Method Details

#exists_from_response?(response, options = {}) ⇒ Boolean


10
11
12
# File 'lib/common/models/wp_timthumb/existable.rb', line 10

def exists_from_response?(response, options = {})
  response.code == 400 && response.body =~ /no image specified/i ? true : false
end