This repository has been archived by the owner on Jun 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating clipping image and hompage_feature to use filesystem backend…
… as default
- Loading branch information
Bruno Bornsztein
committed
Mar 31, 2008
1 parent
1353701
commit f099328
Showing
7 changed files
with
42 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
class ClippingImage < Asset | ||
has_attachment :content_type => :image, | ||
:storage => :s3, | ||
:max_size => 3.megabytes, | ||
:resize_to => "465>", | ||
:path_prefix => "assets", | ||
:thumbnails => { :thumb => "100x100!", :medium_square => '200x200!', :medium => "200>" } | ||
|
||
has_attachment prepare_options_for_attachment_fu(AppConfig.clipping['attachment_fu_options']) | ||
|
||
validates_as_attachment | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
require 'community_engine' | ||
require 's3_cache_control' | ||
|
||
Module.class_eval do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
# CommunityEngine | ||
# CommunityEngine | ||
module CommunityEngine | ||
module ActiveRecordExtensions | ||
|
||
def prepare_options_for_attachment_fu(options) | ||
attachment_fu_options = options.symbolize_keys.merge({:storage => options['storage'].to_sym, | ||
:max_size => options['max_size'].to_i.megabytes}) | ||
end | ||
|
||
end | ||
end | ||
|
||
ActiveRecord::Base.send(:extend, CommunityEngine::ActiveRecordExtensions) |