17 lines
448 B
Ruby
17 lines
448 B
Ruby
module JamRuby
|
|
module S3ManagerMixin
|
|
extend ActiveSupport::Concern
|
|
include AppConfig
|
|
|
|
included do
|
|
end
|
|
|
|
module ClassMethods
|
|
|
|
end
|
|
|
|
def s3_manager(options={:bucket => nil, :public => false})
|
|
@s3_manager ||= S3Manager.new(options[:bucket] ? options[:bucket] : (options[:public] ? app_config.aws_bucket_public : app_config.aws_bucket), app_config.aws_access_key_id, app_config.aws_secret_access_key)
|
|
end
|
|
end
|
|
end |