ct_table_for 0.1.10.beta → 0.1.11.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/ct_table_for/application_helper.rb +9 -1
- data/lib/ct_table_for/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee29cab7f90724f8ed98f10eb7aca82f657e3554
|
4
|
+
data.tar.gz: 0fb92b16ea2c8b5e384c391d8a2b415cc65dc2f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6418fb841912081ef03183d543d4362f090c56e4a76d2b47b9cc6895d91688ecd5c7f460ac277fb6388a08792fedf526b3d1d8dff1a459579369baf6dada24d
|
7
|
+
data.tar.gz: 2cebf0aa7b36e0543ecb423b51adcdc06f6241ddb38a2e47104c2fa3985ea6e8706499125559b24541e7693ef171c9e52b7969d6e880ca600116d8010edeb21c
|
@@ -119,7 +119,11 @@ module CtTableFor
|
|
119
119
|
elsif defined?(Paperclip) and value.is_a?(Paperclip::Attachment)
|
120
120
|
html << table_for_cell_for_image( record, attribute, cell_options: cell_options )
|
121
121
|
else
|
122
|
-
|
122
|
+
if cell_options.include? "l"
|
123
|
+
html << table_for_cell_for_locale(model, attribute, value)
|
124
|
+
else
|
125
|
+
html << value.to_s.truncate(50, separator: " ")
|
126
|
+
end
|
123
127
|
end
|
124
128
|
end
|
125
129
|
html << %Q{</td>}
|
@@ -133,6 +137,10 @@ module CtTableFor
|
|
133
137
|
html << image_tag(record.send(attribute).url(size), class: CtTableFor.table_for_cell_for_image_image_class, style: "max-height: 100px;")
|
134
138
|
html.html_safe
|
135
139
|
end
|
140
|
+
|
141
|
+
def table_for_cell_for_locale model, attribute, value, cell_options: {}
|
142
|
+
html = model.human_attribute_name("#{attribute.underscore}.#{value.underscore}")
|
143
|
+
end
|
136
144
|
|
137
145
|
|
138
146
|
def table_for_actions(record, options: {} )
|
data/lib/ct_table_for/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ct_table_for
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Agustí B.R.
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-06-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|