Module: RedactorRails

Defined in:
lib/redactor-rails.rb,
lib/redactor-rails/http.rb,
lib/redactor-rails/devise.rb,
lib/redactor-rails/engine.rb,
lib/redactor-rails/helper.rb,
lib/redactor-rails/version.rb,
lib/redactor-rails/orm/base.rb,
lib/redactor-rails/orm/mongoid.rb,
lib/redactor-rails/orm/active_record.rb,
lib/redactor-rails/backend/carrierwave.rb

Defined Under Namespace

Modules: Backend, Devise, Helpers, Http, Orm Classes: Asset, Document, DocumentsController, Engine, Picture, PicturesController

Constant Summary collapse

IMAGE_TYPES =
['image/jpeg', 'image/png', 'image/gif', 'image/jpg', 'image/pjpeg', 'image/tiff', 'image/x-png']
FILE_TYPES =
['application/msword', 'application/pdf', 'text/plain', 'text/rtf', 'application/vnd.ms-excel']
VERSION =
"0.5.0.1"
@@image_file_types =
["jpg", "jpeg", "png", "gif", "tiff"]
@@document_file_types =
["pdf", "doc", "docx", "xls", "xlsx", "rtf", "txt"]

Class Method Summary collapse

Class Method Details

.devise_userObject


34
35
36
# File 'lib/redactor-rails.rb', line 34

def self.devise_user
  %s(user)
end

.devise_user_keyObject


38
39
40
# File 'lib/redactor-rails.rb', line 38

def self.devise_user_key
  "#{self.devise_user.to_s}_id".to_sym
end

.document_modelObject


30
31
32
# File 'lib/redactor-rails.rb', line 30

def self.document_model
  RedactorRails::Document
end

.picture_modelObject


26
27
28
# File 'lib/redactor-rails.rb', line 26

def self.picture_model
  RedactorRails::Picture
end