nostalgic 0.5.1 → 0.5.2

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: 15e7bc0d694e278f5fd4fcfd6ca634939411f33eca8b3da1e0b5e683ee97d1ef
4
- data.tar.gz: 6e9398e8382c7ef0a9f60259215a8f871fe8adcfa627d58dff368a370fd8543c
3
+ metadata.gz: a4418d5ac68107e4235b127b04376c9102fdf9bd667b4c6aff7fdc9932ea685f
4
+ data.tar.gz: 40e667462f9bb333254b04df8383affff622e7ae8d9e3821f3ad989c78adf22c
5
5
  SHA512:
6
- metadata.gz: 878a0d1938ab5f4168ea76b990ebee0f94b7c8b246ab22ae9e617a21b227e11a8ca1952d8cc3a8a46d29bedeb3ef9ded63fe37fc8487afa71d3be98ff04e50fc
7
- data.tar.gz: c55d8b329b71986e9e138e8e01333de1c2452bb552fcd57ba262fff95b9c7d1fa287ea9dfe5805165417dcaf65558ca85dea6801183294042c6bb02dfc18b900
6
+ metadata.gz: 3480f68ac795d8ed81cb8dfd6f5b9db21f3c289f835a428ebcec45a1163be670244f7fe9f5d5434bd4c7f7b36fc04450c5b83f8065187d86261628d6ca400fe8
7
+ data.tar.gz: bc2c3809fc452b87adfa1ac4ad54244f90b9549f93fc3e55c3a240c606b3cb8b617c302e143ae45e3f394bdd7087ae264dde1680be3f538a2fe71888ba2a463e
@@ -5,8 +5,10 @@
5
5
  <%= f.collection_select attr, collection, value_method, text_method, options, html_options %>
6
6
  </td>
7
7
  <td>
8
- <%= f.text_field "#{attr}_effective_at", :class => 'datepicker', :style => 'display: none;' %>
9
- <%= image_tag 'nostalgic/list.png', :onclick => 'nostalgic.edit_nostalgic_attr(this); return false;' %>
8
+ <%= f.text_field "#{attr}_effective_at", class: 'datepicker', style: 'display: none;' %>
9
+ </td>
10
+ <td>
11
+ <%= image_tag 'nostalgic/list.png', onclick: 'nostalgic.edit_nostalgic_attr(this); return false;' %>
10
12
  </td>
11
13
  </tr>
12
14
  </thead>
@@ -17,11 +19,13 @@
17
19
  <td>
18
20
  <%= f.hidden_field :id %>
19
21
  <%= f.hidden_field :_destroy %>
20
- <%= f.collection_select :value, collection, value_method, text_method, options, html_options.merge(:disabled => true, :readonly => true) %>
22
+ <%= f.collection_select :value, collection, value_method, text_method, options, html_options.merge(disabled: true, readonly: true) %>
23
+ </td>
24
+ <td>
25
+ <%= content_tag(:span, f.object.effective_at) %>
21
26
  </td>
22
27
  <td>
23
- <%= f.text_field :effective_at, :class => 'datepicker', :disabled => true, :readonly => true %>
24
- <%= image_tag 'nostalgic/minus.png', :onclick => 'nostalgic.remove_row(this); return false;' %>
28
+ <%= image_tag 'nostalgic/minus.png', onclick: 'nostalgic.remove_row(this); return false;' %>
25
29
  </td>
26
30
  </tr>
27
31
  <% end %>
@@ -2,13 +2,13 @@
2
2
  <thead>
3
3
  <tr>
4
4
  <td>
5
- <%= f.text_field attr, :class => css_class %>
5
+ <%= f.text_field attr, class: css_class %>
6
6
  </td>
7
7
  <td>
8
- <%= f.text_field "#{attr}_effective_at", :class => 'datepicker', :style => 'display: none;' %>
8
+ <%= f.text_field "#{attr}_effective_at", class: 'datepicker', style: 'display: none;' %>
9
9
  </td>
10
10
  <td>
11
- <%= image_tag 'nostalgic/list.png', :onclick => 'nostalgic.edit_nostalgic_attr(this); return false;' %>
11
+ <%= image_tag 'nostalgic/list.png', onclick: 'nostalgic.edit_nostalgic_attr(this); return false;' %>
12
12
  </td>
13
13
  </tr>
14
14
  </thead>
@@ -25,7 +25,7 @@
25
25
  <%= content_tag(:span, f.object.effective_at, class: css_class) %>
26
26
  </td>
27
27
  <td>
28
- <%= image_tag 'nostalgic/minus.png', :onclick => 'nostalgic.remove_row(this); return false;' %>
28
+ <%= image_tag 'nostalgic/minus.png', onclick: 'nostalgic.remove_row(this); return false;' %>
29
29
  </td>
30
30
  </tr>
31
31
  <% end %>
@@ -4,13 +4,13 @@ class ActionView::Helpers::FormBuilder
4
4
  include ActionView::Helpers::AssetTagHelper
5
5
 
6
6
  def nostalgic_text_field(method, options = {})
7
- @template.render 'nostalgic/text_field', :f => self, :attr => method, :css_class => options[:class]
7
+ @template.render 'nostalgic/text_field', f: self, attr: method, css_class: options[:class]
8
8
  end
9
9
 
10
10
  def nostalgic_collection_select(method, collection, value_method, text_method, options = {}, html_options = {})
11
11
  @template.render 'nostalgic/collection_select',
12
- :f => self, :attr => method, :collection => collection, :value_method => value_method, :text_method => text_method,
13
- :options => options, :html_options => html_options
12
+ f: self, attr: method, collection: collection, value_method: value_method, text_method: text_method,
13
+ options: options, html_options: html_options
14
14
  end
15
15
 
16
16
  end
@@ -58,7 +58,7 @@ module Nostalgic
58
58
  def #{attr}_on(date)
59
59
  return self.#{attr} unless date.present?
60
60
 
61
- na = Nostalgic::Attr.where(:model_type => self.class.name, :model_id => self.id, :name => '#{attr}')
61
+ na = Nostalgic::Attr.where(model_type: self.class.name, model_id: self.id, name: '#{attr}')
62
62
  na = na.where('effective_at <= ?', date).order('effective_at desc').first
63
63
  na ? na.value : self.#{attr}
64
64
  end
@@ -1,3 +1,3 @@
1
1
  module Nostalgic
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nostalgic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-08 00:00:00.000000000 Z
11
+ date: 2020-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -135,15 +135,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: 2.3.0
138
+ version: 2.5.0
139
139
  required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  requirements:
141
141
  - - ">="
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  requirements: []
145
- rubyforge_project:
146
- rubygems_version: 2.7.6
145
+ rubygems_version: 3.0.3
147
146
  signing_key:
148
147
  specification_version: 4
149
148
  summary: column versioning utility