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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f3a8ebbbbabc634c7d635fc1866cfc7037e79e7
4
- data.tar.gz: ba57b0cdfcdddad068b33e3ea9d2589f3ed2fc51
3
+ metadata.gz: a9c900501b780ab57c15fe303eea9ad39abf256a
4
+ data.tar.gz: aed2da21ea2270a59b2559ab26bd3292b66f9be8
5
5
  SHA512:
6
- metadata.gz: fdad516c267d2bc606de509e742c73348d813c85784b0aaa31a322e562bfad5fedda6400f551a87f5227045c95049fc05151dfaf04e2005c7c886210da80913f
7
- data.tar.gz: 8a29e5419cf76aa24aca38188cad5dd4552a2521287f4ba2376a8250579d0ae15b0c7f2fb7e898510caac8522cc32dc6b4fc89e40b72e7f93c133e5638202023
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: "link_to \"Live (#{2 * 2})\", root_url"
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 eval(model_name::INDEX_COLUMNS[column.to_sym]) if defined?(model_name::INDEX_COLUMNS) && model_name::INDEX_COLUMNS.is_a?(Hash) && model_name::INDEX_COLUMNS[column.to_sym].present?
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
@@ -1,3 +1,3 @@
1
1
  module Redde
2
- VERSION = '0.3.17'.freeze
2
+ VERSION = '0.3.18'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redde
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.17
4
+ version: 0.3.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Bovykin