Module: Paperclip::Interpolations
- Defined in:
- lib/rad/paperclip/extensions.rb
Instance Method Summary collapse
- #account(attachment, style) ⇒ Object
- #crystal_root(attachment, style) ⇒ Object
- #filename_with_style(attachment, style) ⇒ Object
- #space(attachment, style) ⇒ Object
Instance Method Details
#account(attachment, style) ⇒ Object
52 53 54 |
# File 'lib/rad/paperclip/extensions.rb', line 52 def account , style Account.current.name end |
#crystal_root(attachment, style) ⇒ Object
60 61 62 |
# File 'lib/rad/paperclip/extensions.rb', line 60 def crystal_root , style crystal.config.root('') end |
#filename_with_style(attachment, style) ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/rad/paperclip/extensions.rb', line 28 def filename_with_style , style val = filename(, style).clone if style.to_s != 'original' basename_index = val.rindex('.') || (val.size - 1) val.insert basename_index, ".#{style}" end val end |