Class: RedactorRails::Document

Inherits:
Asset
  • Object
show all
Defined in:
lib/generators/redactor/templates/mongoid/carrierwave/redactor/document.rb,
lib/generators/redactor/templates/active_record/carrierwave/redactor/document.rb

Instance Method Summary collapse

Methods included from Orm::ActiveRecord::AssetBase

included

Methods included from Orm::Mongoid::AssetBase

included

Instance Method Details

#as_json_methodsObject



8
9
10
# File 'lib/generators/redactor/templates/active_record/carrierwave/redactor/document.rb', line 8

def as_json_methods
  [:image]
end

#thumbObject



8
9
10
11
12
13
# File 'lib/generators/redactor/templates/mongoid/carrierwave/redactor/document.rb', line 8

def thumb
  # Could theoretically provide an icon set here
  # to match against the extensions
  # but for now it's nil to address the bug
  nil
end

#url_contentObject



4
5
6
# File 'lib/generators/redactor/templates/mongoid/carrierwave/redactor/document.rb', line 4

def url_content
  url(:content)
end