redactor3_rails 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redactor3_rails/version.rb +1 -1
- data/lib/redactor3_rails.rb +48 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ead135f7c23b149f86d21c2cf44faa4a817996ba60671c86d55b65913b3d31d
|
4
|
+
data.tar.gz: 3f8e9b928a23b1f9d075d240a08e53bbc3b2296a8a02863994b287cbc8f470ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96708663f3af61e0c18be0afc6a17ead9fb78a15d47b6cd44867206d39df6b68e190c5e76460064a7168be8b05efeb0cf6fcab8b05c04efd0e58e44420318544
|
7
|
+
data.tar.gz: 28a3b329540a465c30d79068a62bbe9756c238b590b236e11ca3800909d3f328874b103a267723ef7f8361eafe4508c5a2aec0fcd734dc3ddf43a8d454519e5b
|
data/lib/redactor3_rails.rb
CHANGED
@@ -21,14 +21,53 @@ module Redactor3Rails
|
|
21
21
|
@@images_file_types = ['jpg', 'jpeg', 'png', 'gif', 'tiff']
|
22
22
|
@@files_file_types = ['pdf', 'doc', 'docx', 'xls', 'xlsx', 'rtf', 'txt']
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
24
|
+
class << self
|
25
|
+
def image_model=(v)
|
26
|
+
@image_model = v
|
27
|
+
end
|
28
|
+
|
29
|
+
def image_model
|
30
|
+
@image_model ||= Redactor3Rails::Image
|
31
|
+
end
|
32
|
+
|
33
|
+
def file_model=(v)
|
34
|
+
@file_model = v
|
35
|
+
end
|
36
|
+
|
37
|
+
def file_model
|
38
|
+
@file_model ||= Redactor3Rails::File
|
39
|
+
end
|
40
|
+
|
41
|
+
def image_uploader=(v)
|
42
|
+
@image_uploader = v
|
43
|
+
end
|
44
|
+
|
45
|
+
def image_uploader
|
46
|
+
@image_uploader ||= Redactor3RailsImageUploader
|
47
|
+
end
|
48
|
+
|
49
|
+
def file_uploader=(v)
|
50
|
+
@file_uploader = v
|
51
|
+
end
|
52
|
+
|
53
|
+
def file_uploader
|
54
|
+
@file_uploader ||= Redactor3RailsFileUploader
|
55
|
+
end
|
56
|
+
|
57
|
+
def devise_user=(v)
|
58
|
+
@devise_user = v
|
59
|
+
end
|
60
|
+
|
61
|
+
def devise_user
|
62
|
+
@devise_user ||= :user
|
63
|
+
end
|
64
|
+
|
65
|
+
def devise_user_key=(v)
|
66
|
+
@devise_user_key = v
|
67
|
+
end
|
68
|
+
|
69
|
+
def devise_user_key
|
70
|
+
@devise_user_key ||= "#{self.devise_user.to_s}_id".to_sym
|
71
|
+
end
|
33
72
|
end
|
34
73
|
end
|