polaris_view_helpers 1.0.1 → 1.0.5

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: 84994eaf4a3b1280f92760cffbf59cb3d3c8dc56e13e430724674d969e36d67e
4
- data.tar.gz: '026484081fd7ce80e8394ceb102fced746a13ea7738332ac819224e63f4d6639'
3
+ metadata.gz: 86f590211c53981680762196c50d6f1d30b7dfbe3f673c730a2b9bf9b04f047f
4
+ data.tar.gz: 660289014852033d9075f775e939f22a67d2d4f831af72f5efc2b143b816395e
5
5
  SHA512:
6
- metadata.gz: 263aca842373ccbf28a405b235260512a3d4b89def1c5f345249ce309545e9951dff8adfc3078f243e218270179927690798260cadc72acd4ce677294daa7900
7
- data.tar.gz: 2a11a26b33c9384be97f792966876d1a36da071405c5812e96a40c66585ccbe15fe7b4eaaeb1b7318ccf5872f8038ea7bbb3e78ebb4035eb6f714b51ed1fb4f4
6
+ metadata.gz: 46a8d0038d146de703ca8d4bc5df05a1575c8a3289ab3b5d3ba77798acb6863ce68c95d1de42bff7b3a01389de3de88f88d0b1d715e01ade82e667aa7f55f4a1
7
+ data.tar.gz: 30254916ed6bc36e83e890a2cbb93d5086e05c0825644043e0a6228b4efc08abef0141735b5d1e2d66c55d85332dbf0e512b69e51c4e3e503cea678a345badbb
@@ -9,7 +9,7 @@
9
9
  </div>
10
10
  <% end %>
11
11
  <div class="Polaris-TextField">
12
- <%= form.send element_type, att, id: "#{form.object.class.name.tableize.singularize}_#{att}", class: "Polaris-TextField__Input", placeholder: options[:placeholder], value: options[:value] %>
12
+ <%= form.send element_type, att, id: "#{form.object.class.name.tableize.singularize}_#{att}", class: "Polaris-TextField__Input", placeholder: options[:placeholder], value: options[:value] || form.object.send(att) %>
13
13
  <div class="Polaris-TextField__Backdrop"></div>
14
14
  </div>
15
15
  </div>
@@ -120,7 +120,7 @@ module PolarisViewHelpers
120
120
  end
121
121
  button_options ||= {}
122
122
 
123
- additional_classes = ""
123
+ additional_classes = button_options[:additional_classes] || ""
124
124
  (button_options[:modifiers] || []).each do |modifier|
125
125
  additional_classes += "Polaris-Button--#{modifier} "
126
126
  end
@@ -133,6 +133,7 @@ module PolarisViewHelpers
133
133
  link_destination: link_destination,
134
134
  method: button_options[:method],
135
135
  remote: button_options[:remote],
136
+ target: button_options[:target],
136
137
  confirm: button_options[:confirm]
137
138
  }
138
139
  )
@@ -1,3 +1,3 @@
1
1
  module PolarisViewHelpers
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.5"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require 'polaris_view_helpers/helper'
2
+ require 'action_view'
2
3
 
3
4
  module PolarisViewHelpers
4
5
  ActionView::Base.send :include, PolarisViewHelpers::Helper
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polaris_view_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Green
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-06 00:00:00.000000000 Z
11
+ date: 2021-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails