Class: Nozzle::Adapter::Image
Constant Summary collapse
- DEFAULT_SETTINGS =
{ :thumb_size => '200x150', }.freeze
Instance Method Summary collapse
- #default_url ⇒ Object
-
#initialize(record, column, filename = nil, options = {}) ⇒ Image
constructor
A new instance of Image.
Methods inherited from Base
#access_path, #adapter_folder, #adapter_path, #as_json, #content_type, #delete, #dump, #filename, #load, #path, #public_path, #relative_folder, #root, #settings, #size, #store!, #system_path, #to_s, #unlink!, #url, #url?
Methods included from Outlet
#cleanup!, included, #outlets, #prepare, #prepare!
Constructor Details
#initialize(record, column, filename = nil, options = {}) ⇒ Image
Returns a new instance of Image.
10 11 12 13 |
# File 'lib/nozzle/adapter/image.rb', line 10 def initialize( record, column, filename = nil, = {} ) @settings = DEFAULT_SETTINGS.dup super( record, column, filename, ) end |
Instance Method Details
#default_url ⇒ Object
15 16 17 |
# File 'lib/nozzle/adapter/image.rb', line 15 def default_url '/images/image_missing.png' end |