polyblock 1.1.0 → 1.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6da07f208397a2f19bff120cacb833656ea11756
4
- data.tar.gz: 96e21198598afcde2fa5423840aa2adc96f86bfa
3
+ metadata.gz: a92299658f7303efd6feefcedd9ae1f402366c2a
4
+ data.tar.gz: 2832a3dd1838a1cdad87f1f0b1d88515e1441162
5
5
  SHA512:
6
- metadata.gz: 9b7d7b2baa5323d82bbac1cde689ed2018a6b297793d922eeabeaa6caad9a62ffe0038e863d13298a5e072db7a30a2ae3553e6622dd008462f41ece3cb63e9a7
7
- data.tar.gz: 031f8a76427bfe1e0a956c6a4d9540d584ba8b9dfd656c4a96a5e8d648feedbbae29514e1c812dcbdf0be4b178db720468d21cd0dd23cf423258f3e4303f7a05
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
@@ -1,3 +1,3 @@
1
1
  module Polyblock
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyblock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - MacKinley Smith