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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f747abf8b7f354a610102a481773bfb2e87e0f44fd2af40421a8b873bca5686
4
- data.tar.gz: 514820ce60bf0e2ffd20d035cdaf3788ad72bf53949cfee959e84e9fc27e8903
3
+ metadata.gz: 0ead135f7c23b149f86d21c2cf44faa4a817996ba60671c86d55b65913b3d31d
4
+ data.tar.gz: 3f8e9b928a23b1f9d075d240a08e53bbc3b2296a8a02863994b287cbc8f470ab
5
5
  SHA512:
6
- metadata.gz: 14a67f941496305fdcbadcafc7d1792a3eed3e48a62a1418cd56009690e60a1912bcf10e76927b4da9d316d04f974ff4d1a8f3a4af3c40638fbb938cc8a93a88
7
- data.tar.gz: e0237100a73c60c08f57a0d6f62dabeb9fac5f9496e52f37f56d8ea4e3ce7d6bd7d280af3a0c856d3af0e37129dd4366af2b93af2e738b53441934a773366b14
6
+ metadata.gz: 96708663f3af61e0c18be0afc6a17ead9fb78a15d47b6cd44867206d39df6b68e190c5e76460064a7168be8b05efeb0cf6fcab8b05c04efd0e58e44420318544
7
+ data.tar.gz: 28a3b329540a465c30d79068a62bbe9756c238b590b236e11ca3800909d3f328874b103a267723ef7f8361eafe4508c5a2aec0fcd734dc3ddf43a8d454519e5b
@@ -1,3 +1,3 @@
1
1
  module Redactor3Rails
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -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
- mattr_accessor :image_model, :file_model, :devise_user, :image_uploader, :file_uploader
25
- @@image_model = Redactor3Rails::Image
26
- @@file_model = Redactor3Rails::File
27
- @@devise_user = :user
28
- @@file_uploader = Redactor3RailsFileUploader
29
- @@image_uploader = Redactor3RailsImageUploader
30
-
31
- def self.devise_user_key
32
- "#{self.devise_user.to_s}_id".to_sym
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redactor3_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Sulyanov