redde 0.3.17 → 0.3.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -3
- data/app/helpers/redde/index_helper.rb +1 -1
- data/lib/redde/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9c900501b780ab57c15fe303eea9ad39abf256a
|
4
|
+
data.tar.gz: aed2da21ea2270a59b2559ab26bd3292b66f9be8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 334a5ac64ee992376f1528d4d16d3ca3eaa891d281430e643805ebee92a4d0871140f902bd1866484702018683fd4f3047bb5e073a57636b1eaa11317b889ef2
|
7
|
+
data.tar.gz: c66d62ce984a89ed7d0ebbecaa9693363ebf681770aeaae1fbd8545aed8ead86744a085f537203b28b2068de6b5957c43c63c3d7accb24036f35bf54504d6cee
|
data/README.md
CHANGED
@@ -185,11 +185,9 @@ If you need to add, for example, link to nested model, you can define hash insid
|
|
185
185
|
class Calculator < ActiveRecord::Base
|
186
186
|
INDEX_COLUMNS = {
|
187
187
|
name: '',
|
188
|
-
hop:
|
188
|
+
hop: ->(item) { ActionController::Base.helpers.link_to("На сайт (#{2 * 2})", Rails.application.routes.url_helpers.root_path(id: item.id)) }
|
189
189
|
}
|
190
190
|
FORM_COLUMNS = %w(name)
|
191
191
|
end
|
192
192
|
|
193
193
|
```
|
194
|
-
|
195
|
-
|
@@ -148,7 +148,7 @@ module Redde::IndexHelper
|
|
148
148
|
end
|
149
149
|
|
150
150
|
def index_value_for(item, column)
|
151
|
-
return
|
151
|
+
return model_name::INDEX_COLUMNS[column.to_sym].call(item) if defined?(model_name::INDEX_COLUMNS) && model_name::INDEX_COLUMNS.is_a?(Hash) && model_name::INDEX_COLUMNS[column.to_sym].present?
|
152
152
|
item.send(column)
|
153
153
|
end
|
154
154
|
end
|
data/lib/redde/version.rb
CHANGED