rails_kindeditor 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +17 -0
- data/lib/rails_kindeditor/version.rb +1 -1
- data/rails_kindeditor.gemspec +1 -1
- metadata +2 -18
data/README.md
CHANGED
@@ -59,6 +59,8 @@ That's all.
|
|
59
59
|
### simple_form:
|
60
60
|
|
61
61
|
```ruby
|
62
|
+
<%= form.input :content, :as => :kindeditor %>
|
63
|
+
# or
|
62
64
|
<%= form.input :content, :as => :kindeditor, :label => false, :input_html => { :width => 800, :height => 300 } %>
|
63
65
|
```
|
64
66
|
|
@@ -66,6 +68,7 @@ That's all.
|
|
66
68
|
|
67
69
|
```ruby
|
68
70
|
<%= form.input :content, :as => :kindeditor %>
|
71
|
+
# or
|
69
72
|
<%= form.input :content, :as => :kindeditor, :input_html => { :height => 300 } %>
|
70
73
|
```
|
71
74
|
|
@@ -86,6 +89,7 @@ You can customize some option for uploading.
|
|
86
89
|
config.upload_file_ext = %w[doc docx xls xlsx ppt htm html txt zip rar gz bz2]
|
87
90
|
|
88
91
|
# Porcess upload image size, need mini_magick
|
92
|
+
# before => after
|
89
93
|
# eg: 1600x1600 => 800x800
|
90
94
|
# 1600x800 => 800x400
|
91
95
|
# 400x400 => 800x800
|
@@ -110,6 +114,12 @@ rails_kindeditor can save upload file information into database.
|
|
110
114
|
rake db:migrate
|
111
115
|
```
|
112
116
|
|
117
|
+
### If you're using mongoid, please add 'gem "carrierwave-mongoid"' in your Gemfile
|
118
|
+
|
119
|
+
```ruby
|
120
|
+
gem 'carrierwave-mongoid'
|
121
|
+
```
|
122
|
+
|
113
123
|
## License
|
114
124
|
|
115
125
|
MIT License.
|
@@ -202,6 +212,7 @@ rails_kindeditor可以帮助你的rails程序集成kindeditor,包括了图片和
|
|
202
212
|
config.upload_file_ext = %w[doc docx xls xlsx ppt htm html txt zip rar gz bz2]
|
203
213
|
|
204
214
|
# 处理上传文件,需要mini_magick
|
215
|
+
# 处理以前 => 处理以后
|
205
216
|
# eg: 1600x1600 => 800x800
|
206
217
|
# 1600x800 => 800x400
|
207
218
|
# 400x400 => 800x800
|
@@ -226,6 +237,12 @@ rails_kindeditor 可以将上传文件信息记录入数据库,以便扩展应
|
|
226
237
|
rake db:migrate
|
227
238
|
```
|
228
239
|
|
240
|
+
### 如果你使用的是mongoid, 请在你的Gemfile里加入'gem "carrierwave-mongoid"'
|
241
|
+
|
242
|
+
```ruby
|
243
|
+
gem 'carrierwave-mongoid'
|
244
|
+
```
|
245
|
+
|
229
246
|
## License
|
230
247
|
|
231
248
|
MIT License.
|
data/rails_kindeditor.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_kindeditor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: carrierwave
|
@@ -27,22 +27,6 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: carrierwave-mongoid
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ! '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '0'
|
38
|
-
type: :runtime
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
46
30
|
- !ruby/object:Gem::Dependency
|
47
31
|
name: mini_magick
|
48
32
|
requirement: !ruby/object:Gem::Requirement
|