cutlass_js_rails 0.2.0 → 0.3.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
  SHA1:
3
- metadata.gz: 5f6ade3d21d7ccb219a3908cc7f47d385d10989b
4
- data.tar.gz: bc7b764c1c6d3846314b2fcf77c54fcfe79e3c71
3
+ metadata.gz: 653c48d04d8b48db5ea3de07235781216cad3d6e
4
+ data.tar.gz: 427d727b0efa5f2197ae1aea1c9732ea830b40da
5
5
  SHA512:
6
- metadata.gz: 156f9da3631a769733f75622d2c5156daed9a050e4fffe062f27012b11912869ab86519897ac121fcd5666cb458066e95f88c9aff5f71b28713f651500b09110
7
- data.tar.gz: 7d35ac53a6553ce8b711a9cb15d93ad6a3517064be833a58db31554f70922fd0a24d8d103aca05f3193fb89453f0fd8a500b6c7ab7b9102a54a27555ac6bb0f4
6
+ metadata.gz: 59cbb937dec6ae155274f4251151b63ed89fc79c71eb7a7b5b98ed5ea2dcce25afc866891acbd792ffa9ddee857fe6409b829178cb804c4db471212a3276fbcb
7
+ data.tar.gz: 33d1ecd3cd9af8355fe344363b7987f32d72accda6e9a053ec7aeb3653ce2c99de434f35f81d5f1d019171d49558e8e6e044f89dbe75187eda579c46092f84b8
@@ -1,3 +1,4 @@
1
1
  <% css_classes = (defined? css_classes) ? css_classes : '' %>
2
2
  <% props = local_assigns.fetch(:props, {}) %>
3
- <%= f.text_field code, class: "Cutlass-input-text #{css_classes}", 'data-label': label, type: 'tel', 'data-always-active': true, 'data-error': model.errors[field][0], **props %>
3
+ <% value = local_assigns.fetch(:value, model.send(code)) %>
4
+ <%= f.text_field code, class: "Cutlass-input-text #{css_classes}", 'data-label': label, value: value, type: 'tel', 'data-always-active': true, 'data-error': model.errors[code][0], **props %>
@@ -1,4 +1,5 @@
1
1
  <% css_classes = (defined? css_classes) ? css_classes : '' %>
2
2
  <% code = local_assigns.fetch(:code) %>
3
3
  <% props = local_assigns.fetch(:props, {}) %>
4
+ <% value = local_assigns.fetch(:value, model.send(code)) %>
4
5
  <%= f.select code, options_for_select(options, selected: value), props.merge(selected: value), { class: "Cutlass-input-select #{css_classes}", 'data-label': label, 'data-error': model.errors[code][0] } %>
@@ -1,5 +1,5 @@
1
1
  <% css_classes = (defined? css_classes) ? css_classes : '' %>
2
2
  <% props = (defined? props) ? props.to_h : {} %>
3
3
  <% code = local_assigns.fetch(:code) %>
4
- <% value = local_assigns.fetch(:value, '') %>
4
+ <% value = local_assigns.fetch(:value, model.send(code)) %>
5
5
  <%= f.text_field code, class: "Cutlass-input-text #{css_classes}", value: value, **({ 'data-label' => label, 'data-error' => model.errors[code][0] }.merge(props).symbolize_keys) %>
@@ -1,7 +1,7 @@
1
1
  <% css_classes = (defined? css_classes) ? css_classes : '' %>
2
2
  <% code = local_assigns.fetch(:code) %>
3
3
  <% label = local_assigns.fetch(:label) %>
4
- <% value = local_assigns.fetch(:value, '') %>
4
+ <% value = local_assigns.fetch(:value, model.send(code)) %>
5
5
  <%= f.check_box code, {
6
6
  class: "Cutlass-input-toggler js-conditional-switch #{css_classes}",
7
7
  checked: value == 'true',
@@ -1,3 +1,3 @@
1
1
  module CutlassJsRails
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cutlass_js_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - chardos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-17 00:00:00.000000000 Z
11
+ date: 2016-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler