active_scaffold_signaturepad 0.1.1 → 0.2.0

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: 6f03a9df6347ad508446f4bef170e2acee2b7cae1b4d53d4469c33d5826cba62
4
- data.tar.gz: 686482d4a95dd96487fedb622941cfb3e407b366b25ee3c821ede604b4f1bbae
3
+ metadata.gz: f29454f588da266d260effcd972428c92ed1a11367ce4bf3ce53e2fd1497db54
4
+ data.tar.gz: 6a0778d3014b743cb7bb3e7985758e05bbf0a39e5f43fdc1f7b8ec2f8ed032c5
5
5
  SHA512:
6
- metadata.gz: 03e789c264c8112ab0868c12474ba81ee2629daf203c39c3dad193ca7f92c48a5de26fedbdc8cffb1a5a5e81701d4d409617749b60a5c9e72e04a192fd5bb55f
7
- data.tar.gz: 367787ed2c7241486029088c2da3a261cebef9b654eac69d3d8f0e82ebee2136f7638f8ef6e1124400fddbcf70e578154375fb3c8641e684b91180446bfd15e8
6
+ metadata.gz: 4022f9b368d931156f78a56410be4e314a1743e20d68dd0e55a7a0cfe3ee832abb6dc4159cc8ec931345033e148c6c306e2c5a3b1cacce25a5a63ed6f86cca9a
7
+ data.tar.gz: 1a17d91798022b43760bbdfe81e2645eb989ce26a518af153a940872010c728057df575cfba3f99205dea069851ed5482af40be69bd411607bc535b4e2c14764
@@ -1,4 +1,9 @@
1
1
  module ActiveScaffoldSignaturepad
2
2
  class Engine < ::Rails::Engine
3
+ initializer 'active_scaffold_signaturepad.action_view' do
4
+ ActiveSupport.on_load :action_view do
5
+ include ActiveScaffoldSignaturepad::ViewHelpers
6
+ end
7
+ end
3
8
  end
4
9
  end
@@ -1,8 +1,8 @@
1
1
  module ActiveScaffoldSignaturepad
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 1
5
- PATCH = 1
4
+ MINOR = 2
5
+ PATCH = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
@@ -2,8 +2,8 @@ module ActiveScaffoldSignaturepad
2
2
  module ViewHelpers
3
3
  ATTRIBUTES = [:line_colour, :line_width, :line_margin, :line_top, :bg_colour, :pen_colour, :pen_width, :pen_cap, :display_only, :error_message_draw]
4
4
  def signaturepad_attributes(column, ui_options: column.options)
5
- attributes = ATTRIBUTES.map{ |attr| [attr, ui_options[attr]] if ui_options[attr] }
6
- attributes = Hash[attributes].reverse_merge(:error_message_draw => :sign_document)
5
+ attributes = ATTRIBUTES.map{ |attr| [attr, ui_options[attr]] if ui_options[attr] }.compact.to_h
6
+ attributes.reverse_merge!(:error_message_draw => :sign_document)
7
7
  attributes[:type] = ui_options[:type] if ui_options[:type]
8
8
  attributes[:error_message_draw] = as_(attributes[:error_message_draw]) if attributes[:error_message_draw].is_a? Symbol
9
9
  attributes
@@ -7,6 +7,5 @@ module ActiveScaffoldSignaturepad
7
7
  autoload 'ViewHelpers', 'active_scaffold_signaturepad/view_helpers.rb'
8
8
  end
9
9
 
10
- ActionView::Base.send :include, ActiveScaffoldSignaturepad::ViewHelpers
11
10
  ActiveScaffold.stylesheets << 'active_scaffold_signaturepad'
12
11
  ActiveScaffold.javascripts << 'active_scaffold_signaturepad'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold_signaturepad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio Cambra
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-02-21 00:00:00.000000000 Z
12
+ date: 2024-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler