html_tables 0.0.13 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/html_tables.gemspec +0 -1
- data/lib/html_tables/data_table.rb +1 -0
- data/lib/html_tables/format_for_output.rb +1 -2
- data/lib/html_tables/renderer.rb +1 -1
- data/lib/html_tables/to_label.rb +1 -1
- data/lib/html_tables/version.rb +1 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d90de7f04ac8fbf6077c5c10e04e2575aea14b5a
|
4
|
+
data.tar.gz: 887eab17839295574b46cd92b4894fb2e94ae7f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cb9d0da574be5552abe574c7d2964c5c57e363df94e89ad9728536e6ea846fc7de04ab65312386c8e5f3748c00aa1b53fbc01cefe6697eb8c522373d7bb306c
|
7
|
+
data.tar.gz: 207ce3941a027aeb990f9088bc27c7ab312fb0bd44aede7a699fd16e0b67b2cfbc2eec0bf991a6ac5393616c6428d4a1849eacfaccd6454673bdd284b0ec981f
|
data/html_tables.gemspec
CHANGED
@@ -53,6 +53,7 @@ module HtmlTables
|
|
53
53
|
v ||= I18n.t(column_id, scope: [:tables, options[:name] || :default], raise: true) rescue nil
|
54
54
|
v ||= I18n.t(column_id, scope: [:tables, :default], raise: true) rescue nil
|
55
55
|
v ||= I18n.t(column_id, scope: [:activerecord, :attributes, model_name.underscore], raise: true) rescue nil
|
56
|
+
v ||= I18n.t(column_id, scope: [:mongoid, :attributes, model_name.underscore], raise: true) rescue nil
|
56
57
|
v ||= I18n.t(column_id, scope: [:attributes], raise: true) rescue nil
|
57
58
|
v ||= model_columns[column_id].human_name rescue nil
|
58
59
|
|
@@ -3,11 +3,10 @@
|
|
3
3
|
module HtmlTables
|
4
4
|
module FormatForOutput
|
5
5
|
def format_for_output
|
6
|
+
return to_label(:short) if respond_to?(:to_label)
|
6
7
|
case self
|
7
8
|
when Date, Time, DateTime
|
8
9
|
I18n.l(self, format: :short)
|
9
|
-
when ActiveRecord::Base
|
10
|
-
self.to_label(:short)
|
11
10
|
when TrueClass, FalseClass
|
12
11
|
I18n.t(self.to_s)
|
13
12
|
else
|
data/lib/html_tables/renderer.rb
CHANGED
@@ -135,7 +135,7 @@ module HtmlTables
|
|
135
135
|
tmp
|
136
136
|
end
|
137
137
|
|
138
|
-
if config.use_entity_shortcuts && v.
|
138
|
+
if config.use_entity_shortcuts && v.class.name == 'ActiveRecord::Base'
|
139
139
|
btn = content_tag(:div, class: 'entity-shortcut') do
|
140
140
|
link_to(config.url_generator_proc.(v), class: 'btn btn-small') do
|
141
141
|
content_tag(:i, nil, class: 'icon-share')
|
data/lib/html_tables/to_label.rb
CHANGED
data/lib/html_tables/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html_tables
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fábio David Batista
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: activerecord
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
55
|
description: Simple DSL for HTML data tables
|
70
56
|
email:
|
71
57
|
- fabio@elementarsistemas.com.br
|
@@ -109,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
95
|
version: '0'
|
110
96
|
requirements: []
|
111
97
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
98
|
+
rubygems_version: 2.3.0
|
113
99
|
signing_key:
|
114
100
|
specification_version: 4
|
115
101
|
summary: This gem was extracted from some projects on my company. Everyone is welcome
|