data_table 0.4.10 → 0.4.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmI5OTc2NmJlNWFhNmZlMTkxOGQwNzA0YWZmY2ZmYjE2MTJkY2Q4Nw==
4
+ YjM1YWQ1MGNjMjAwNTBjMDg1OTZlNTQzMDA0YTI4ZmJiYTk2YzhhNg==
5
5
  data.tar.gz: !binary |-
6
- NDBkNjgxMjEzN2IwNjExZDk0MThjODNmMDg1MDk3ZWJjZDI0MTUyNQ==
7
- !binary "U0hBNTEy":
6
+ MjM1ZWRhN2Q1MDI4NGM4NDRhNmNkZDUwZTRiZDFlMDJjNDFjYTZjMA==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- OWU5NzRhYzNiYWNkNzQ4YWIyMjY4ZTJjZWE5MGQyNDMyNDMwMjMxOWE0ZDRl
10
- MGU0NmY4ZjAxYzc0NWViZTI4NmI0MGY1OGI3ZmQ4MWRhNGZmMDcxYjYzOWYx
11
- ODA4MDRhZmVhYmIwOTQ4NGNiODMwNjY3OWJmMzgyM2FlM2E3ODk=
9
+ OTkyMjZkN2FlMGQzMDYxZDVhY2EwMzFiY2QwYzA5YjA5MjRjMjc3ODdmNjQ2
10
+ ODk2MTFmZjAyODNiNmI5ZWFhMjgwZmU4ZTk1Mjg4MTMwZjIzYmI1ODAxY2Nm
11
+ ZGI5M2QzMzViN2M5MTIxY2ZmM2YwNmRhOTI0YjhlMTYwOTk2MTM=
12
12
  data.tar.gz: !binary |-
13
- MjcwY2RmMDcxYzY2ODdjMmMwYzgyY2I4YTBlNjQ4ZjFkZjhiNTgxZDExM2Ez
14
- MzU1ZjdhYWVhNGMyYzYxMDc2MWU0ZWNkMWM2ZTkxYzU4YzAxMTM2YTk1Mjk3
15
- NjhhMzU0YWY2ZjBlYWZkNDlhNzA1YTZhM2MxMDZkNWY5MjllZWE=
13
+ MTY5ZGRjMDcyMDg0NGM5YTQ1ZDg2OTkyZDBlM2YxOGUyOTA5YTRkZGIxMTY4
14
+ YzgzNTM0MDM0NjY4OTUzZTE1YTY2OGIyMjFhMTMwZjI1NGYwMWYzMGRmZjQw
15
+ MTg5YjQ5ZjIyM2Q1M2IwNTkxYzY2MDIzZDRmMzVkZGM0NDk3NTE=
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- data_table (0.4.10)
4
+ data_table (0.4.11)
5
5
  rails (>= 3.0)
6
6
 
7
7
  GEM
@@ -17,6 +17,8 @@ module DataTable
17
17
  field = it.split('.')
18
18
 
19
19
  if (field.size == 2) then
20
+ next if object.class.name.downcase == field[0].singularize
21
+
20
22
  if object.respond_to?(field[0].to_sym)
21
23
  joins.add field[0].to_sym
22
24
  elsif object.respond_to?(field[0].singularize.to_sym)
@@ -26,9 +26,10 @@ module DataTable
26
26
  def _yield_and_render_array controller, objects, block
27
27
  objects.map do |object|
28
28
  block[object].map do |string|
29
+ safe_string = string.gsub("|", " ")
29
30
  controller.instance_eval %{
30
31
  log_level, Rails.logger.level = Rails.logger.level, Logger::ERROR
31
- render_to_string(:inline => %q|#{string}|, :locals => {:#{self.name.underscore} => object}).tap do
32
+ render_to_string(:inline => %q|#{safe_string}|, :locals => {:#{self.name.underscore} => object}).tap do
32
33
  Rails.logger.level = log_level
33
34
  end
34
35
  }
@@ -1,3 +1,3 @@
1
1
  module DataTable
2
- VERSION = "0.4.10"
2
+ VERSION = "0.4.11"
3
3
  end
@@ -51,10 +51,6 @@ describe DataTable do
51
51
 
52
52
  end
53
53
 
54
- context "#_yield_and_render_array" do
55
-
56
- end
57
-
58
54
  context "#_yield_and_render_array" do
59
55
 
60
56
  it "should walk through the array and render it, passing in the appropriate local name" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_table
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10
4
+ version: 0.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Dew
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-18 00:00:00.000000000 Z
11
+ date: 2013-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  version: '0'
115
115
  requirements: []
116
116
  rubyforge_project: data_table
117
- rubygems_version: 2.0.7
117
+ rubygems_version: 2.1.11
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Simple data preparation from AR/Mongoid to the jQuery DataTables plugin