rows_controller 2.0.7 → 2.0.8

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: e56282b6de1f22ebb0cecd4c277d4ec0d84615a0
4
- data.tar.gz: 14bb4f2ce1ea1b8e0be466f50a9e6276e5280c9c
3
+ metadata.gz: 2c1a2d58050cec8273532a04b600e01a0660d19b
4
+ data.tar.gz: d6fb8fa93464f760c36b88b5234346b016f37e64
5
5
  SHA512:
6
- metadata.gz: 89ecd8099220b7c9423234a52df31f0999e1cddc0be6c9e212101169ddce0dcbfe1a3f32f0864fb680ed82fa15f4543c6db76f9f8140c9224602049757328a03
7
- data.tar.gz: 1a8c3b8aea0840dd7d027e8330a862a73b291d6ae9e9e117adc6c93af0365bc9ef27ad5fc961a62fb132e01125dbc23dcd4a92a493c218541cac07f99f13b5b9
6
+ metadata.gz: 123dc690a1d8a8d827a5e82a44569e3964889f3b6bee90c2363bfbdf1eb4f76480e31fe5a3556145cb9166075a4a55b19b5a2b75363c1eb38fd5f4c7c819d5cc
7
+ data.tar.gz: 918ebe33e38ea1b4b5abb69de8400e873e4351739788437f0cc2b57b252e6bbb1b4c2fac83ac02919485337fb2dd4383b332c2429b3e69a3d68c77e801c07097
@@ -14,10 +14,12 @@ de:
14
14
  empty_list: 'Liste %{model} ist leer.'
15
15
 
16
16
  button:
17
+ ok: OK
17
18
  back: "Zurück"
18
- create: 'Erstelle'
19
- update: 'Speichern'
19
+ cancel: Abbrechen
20
+ create: Erstelle
21
+ update: Speichern
20
22
  delete: 'Lösche'
21
- edit: 'Editieren'
22
- show: 'Zeige'
23
- clone: 'Klonen'
23
+ edit: Editieren
24
+ show: Zeige
25
+ clone: Klonen
@@ -13,10 +13,12 @@ en:
13
13
  empty_list: 'List %{model} is empty'
14
14
 
15
15
  button:
16
- back: 'Back'
17
- create: 'Create'
18
- update: 'Update'
19
- delete: 'Delete'
20
- edit: 'Edit'
21
- show: 'Show'
22
- clone: 'Clone'
16
+ ok: OK
17
+ back: Back
18
+ cancel: Cancel
19
+ create: Create
20
+ update: Update
21
+ delete: Delete
22
+ edit: Edit
23
+ show: Show
24
+ clone: Clone
data/lib/rows/utils.rb CHANGED
@@ -7,7 +7,8 @@ module Rows::Utils
7
7
  x.class == ActiveSupport::TimeWithZone
8
8
  return x.strftime('%d.%m.%Y').html_safe if bool
9
9
  # return I18n.l(x) if bool
10
- return x.to_s.html_safe if x.class == Fixnum
10
+ # return x.to_s.html_safe if x.class == Fixnum
11
+ return x.to_s.html_safe if x.kind_of?(Integer)
11
12
  return 'X'.html_safe if x.class == TrueClass
12
13
  return ' '.html_safe if x.class == FalseClass
13
14
  return x.call if x.class == Proc
@@ -0,0 +1,19 @@
1
+ module Rows::Utils
2
+
3
+ # formatting
4
+ def resource_format(x)
5
+ return '--'.html_safe if x.nil?
6
+ bool = x.class == Time || x.class == Date || x.class == DateTime ||
7
+ x.class == ActiveSupport::TimeWithZone
8
+ return x.strftime('%d.%m.%Y').html_safe if bool
9
+ # return I18n.l(x) if bool
10
+ return x.to_s.html_safe if x.class == Fixnum
11
+ return 'X'.html_safe if x.class == TrueClass
12
+ return ' '.html_safe if x.class == FalseClass
13
+ return x.call if x.class == Proc
14
+ return '---'.html_safe if x.empty?
15
+ str = x.to_s
16
+ return str.gsub(/\r*\n/, '<br/>')
17
+ end
18
+
19
+ end
data/lib/rows/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rows
2
- VERSION = "2.0.7"
2
+ VERSION = "2.0.8"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  module Rows
2
- VERSION = "2.0.6"
2
+ VERSION = "2.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rows_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.7
4
+ version: 2.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dittmar Krall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-27 00:00:00.000000000 Z
11
+ date: 2017-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sqlite3
@@ -57,6 +57,7 @@ files:
57
57
  - lib/rows/model.rb
58
58
  - lib/rows/resources.rb
59
59
  - lib/rows/utils.rb
60
+ - lib/rows/utils.rb.bak
60
61
  - lib/rows/version.rb
61
62
  - lib/rows/version.rb.bak
62
63
  - lib/rows_controller.rb
@@ -80,9 +81,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
81
  version: '0'
81
82
  requirements: []
82
83
  rubyforge_project:
83
- rubygems_version: 2.4.8
84
+ rubygems_version: 2.5.1
84
85
  signing_key:
85
86
  specification_version: 4
86
87
  summary: RowsController DRYs your controllers.
87
88
  test_files: []
88
- has_rdoc: