forked from cch1/attach
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.rb
More file actions
12 lines (10 loc) · 677 Bytes
/
init.rb
File metadata and controls
12 lines (10 loc) · 677 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
# Due to the sequence of dependency processing and plugin initialization, these statements cannot be used to auto-install
# missing gems -they are here solely for documentation.
require 'geometry'
require 'hapgood/attach'
Hapgood::Attach::StandardImageGeometry = { :thumbnail => ::Geometry.from_s("128x128>"),
:vignette => ::Geometry.from_s('256x256>'),
:proof => ::Geometry.from_s('512x512>'),
:max => ::Geometry.from_s('2097152@')} # 2 Megapixels
ActiveRecord::Base.send(:extend, Hapgood::Attach::ActMethods)
FileUtils.mkdir_p Hapgood::Attach::Sources::Base.tempfile_path