Module: RedmineS3::AttachmentsControllerPatch

Defined in:
lib/redmine_s3/attachments_controller_patch.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

:nodoc:



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/redmine_s3/attachments_controller_patch.rb', line 3

def self.included(base) # :nodoc:
  base.extend(ClassMethods)
  base.send(:include, InstanceMethods)
 
  # Same as typing in the class 
  base.class_eval do
    unloadable # Send unloadable so it will not be unloaded in development
    before_filter :redirect_to_s3, :except => :destroy
    skip_before_filter :file_readable
  end
end