Class: Formily::PaperclipConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/formily/config.rb

Overview

Paperclip gem config

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePaperclipConfig

Returns a new instance of PaperclipConfig.



63
64
65
66
67
68
# File 'lib/formily/config.rb', line 63

def initialize
  @path = ':rails_root/public/formily_file/:id/:style_:basename.:extension'
  @url = '/formily_file/:id/:style_:basename.:extension'
  # @default_url = ''
  @use_timestamp = false
end

Instance Attribute Details

#pathObject

The files that are assigned as attachments are, by default, placed in the directory specified by this option.



55
56
57
# File 'lib/formily/config.rb', line 55

def path
  @path
end

#urlObject

The full URL of where the attachment is publicly accessible.



52
53
54
# File 'lib/formily/config.rb', line 52

def url
  @url
end

#use_timestampObject

Returns the value of attribute use_timestamp.



61
62
63
# File 'lib/formily/config.rb', line 61

def use_timestamp
  @use_timestamp
end