polyblock 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/polyblock/capybara_helpers.rb +2 -2
- data/lib/polyblock/strong_params_helper.rb +4 -1
- data/lib/polyblock/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a92299658f7303efd6feefcedd9ae1f402366c2a
|
4
|
+
data.tar.gz: 2832a3dd1838a1cdad87f1f0b1d88515e1441162
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17fe32d78b3c2ca2d1520b8a2292b8246b07115422159824a2b2c86278a6f0f10bd7f858873129e4080b04e3a2a0fee3d54c2c5b075ce8d6dae7611c4b2bbefe
|
7
|
+
data.tar.gz: 7128999258a93f7f3d435cf0634e11de5af1428d8a6790b891ca7ea76ffb14fcd5fc74c42beccc56b4a4924dda761657849340e9ac57efba939c063e6dfaa850
|
@@ -14,7 +14,7 @@ module Polyblock
|
|
14
14
|
# Fill the editor content
|
15
15
|
page.execute_script <<-SCRIPT
|
16
16
|
var ckeditor = CKEDITOR.instances['#{locator}'];
|
17
|
-
ckeditor.setData('#{params[:with].gsub("'", "
|
17
|
+
ckeditor.setData('#{params[:with].gsub("'", "\\\'")}');
|
18
18
|
ckeditor.focus();
|
19
19
|
setTimeout(function(){
|
20
20
|
ckeditor.updateElement();
|
@@ -29,7 +29,7 @@ module Polyblock
|
|
29
29
|
var ckeditor = CKEDITOR.instances[element.attr('id')];
|
30
30
|
setTimeout(function(){
|
31
31
|
ckeditor.fire('focus');
|
32
|
-
ckeditor.setData('#{params[:with]}');
|
32
|
+
ckeditor.setData('#{params[:with].gsub("'", "\\\'")}');
|
33
33
|
ckeditor.focus();
|
34
34
|
ckeditor.updateElement();
|
35
35
|
}, 1);
|
@@ -3,9 +3,12 @@ require 'polyblock'
|
|
3
3
|
module Polyblock
|
4
4
|
module StrongParamsHelper
|
5
5
|
|
6
|
-
def polyblock_params(block)
|
6
|
+
def self.polyblock_params(block)
|
7
7
|
{ :"#{block}_attributes" => [:name, :content] }
|
8
8
|
end
|
9
|
+
def polyblock_params(block)
|
10
|
+
Polyblock::StrongParamsHelper.polyblock_params block
|
11
|
+
end
|
9
12
|
|
10
13
|
end
|
11
14
|
end
|
data/lib/polyblock/version.rb
CHANGED