active_scaffold_vho 3.2.9 → 3.2.10

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
- NmNjMTRjZWFkYWM5ZWJjZDU1NGJkZGI0MWM0ZDZjNDQ3OTZmMzQ5Mw==
4
+ MGQ4MzQyOGU2ZjQ3MTJmYWQ3NDVlMjY2ODVmMjNkOGQ1YzY2MDljMg==
5
5
  data.tar.gz: !binary |-
6
- ZDE2MGFlYmRmNWQ3ZmE1N2EwYjMwNTU2ZTc1YTlmMDVjY2E3MDIzNQ==
6
+ NjcwMDEzMmJmYjk0YTE2NThlMWNiZWU1N2JhMzQ3MjY3ODYxNDI2MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MDI2ODUyN2U4NTY0ZTFkYWYxZGMyZDcyMzIwNWE2N2E0ZGUyZmI5ZjdmZTJi
10
- ODFmY2JmOTFjMmM2YmMzODU0ZDZmYzcwNzBlOTM5OGJiMTk5NjM0OTk5ZmYz
11
- MzQ3NzNlZGZiMWM5MDBlMDMzYTQyODdmMGNjY2VmNmMxN2JmYTg=
9
+ ZDgwN2VjZGZhMDJiYjY0NDg2Y2IxNzZhMDIzMzBjZTI2M2VmNjQ4M2RiMmQ2
10
+ MzY4YmM5YjE0MjI0Y2ZjNThlNDU3NjY0NTBjOGNkMTlhNWY1NzhmZTFiNzUx
11
+ YTJjMmZkNjJkMWVlM2RjOGIzN2EwY2Q0MmQzZThjZTBmNTdjOWI=
12
12
  data.tar.gz: !binary |-
13
- OTJiMTcwMTRlYzNlMDk2OWFhODFhM2RhNDhiOTY5MjMxYWJmMTEwZGY2M2Nl
14
- NjM2YjNmZDNkYzhmMzJkZDNjMjg2N2JmYmQ2YTUxM2U4Mzc2ODY4NTIwYWEz
15
- NGNhYjYzOTIwOTRlZjMyNzk5NzdhZjIxZGVhNGJkNDYyOTc1YTQ=
13
+ ZTk5ZmJkNDliZTQ4YmY5ZmQxN2Q0ZGRmOWYyYjMyZmQ0YTk3ZTNhNjYzODlm
14
+ YmM4ZGI3NTU1M2MxMjYyZTE2ODg2YTQyMmNjNWIzZWRkM2NlMjc4NGU2M2Ew
15
+ OTY3OThhYzRlMjVjODJlYWUzZWEwNWI4OGU4YWM4YzcwMmQ5NTU=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_scaffold_vho (3.2.8)
4
+ active_scaffold_vho (3.2.9)
5
5
  kaminari
6
6
  rails (>= 3.1.0)
7
7
 
@@ -166,7 +166,11 @@ module ActiveScaffold::Actions
166
166
  end
167
167
 
168
168
  def virtual_columns(columns)
169
- columns.reject {|col| active_scaffold_config.model.columns_hash[col] || active_scaffold_config.model.reflect_on_association(col)}
169
+ columns.reject {|col| active_scaffold_config.model.columns_hash[col.to_s] || active_scaffold_config.model.reflect_on_association(col)}
170
+ end
171
+
172
+ def association_columns(columns)
173
+ columns.select {|col| active_scaffold_config.model.reflect_on_association(col)}
170
174
  end
171
175
 
172
176
  private
@@ -45,7 +45,8 @@ module ActiveScaffold::Actions
45
45
  end
46
46
  def list_respond_to_json
47
47
  column_names = successful? ? list_columns_names : error_object_attributes
48
- render :text => response_object.to_json(:only => column_names, :methods => virtual_columns(column_names)), :content_type => Mime::JSON, :status => response_status
48
+ response_text = response_object.to_json(:only => column_names + [active_scaffold_config.model.primary_key], :include => association_columns(column_names), :methods => virtual_columns(column_names))
49
+ render :text => response_text, :content_type => Mime::JSON, :status => response_status
49
50
  end
50
51
  def list_respond_to_yaml
51
52
  column_names = successful? ? list_columns_names : error_object_attributes
@@ -2,7 +2,7 @@ module ActiveScaffold
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 2
5
- PATCH = 9
5
+ PATCH = 10
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold_vho
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.9
4
+ version: 3.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Many, see README
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-20 00:00:00.000000000 Z
11
+ date: 2014-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shoulda