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 +8 -8
- data/Gemfile.lock +1 -1
- data/lib/active_scaffold/actions/core.rb +5 -1
- data/lib/active_scaffold/actions/list.rb +2 -1
- data/lib/active_scaffold/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MGQ4MzQyOGU2ZjQ3MTJmYWQ3NDVlMjY2ODVmMjNkOGQ1YzY2MDljMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjcwMDEzMmJmYjk0YTE2NThlMWNiZWU1N2JhMzQ3MjY3ODYxNDI2MQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDgwN2VjZGZhMDJiYjY0NDg2Y2IxNzZhMDIzMzBjZTI2M2VmNjQ4M2RiMmQ2
|
10
|
+
MzY4YmM5YjE0MjI0Y2ZjNThlNDU3NjY0NTBjOGNkMTlhNWY1NzhmZTFiNzUx
|
11
|
+
YTJjMmZkNjJkMWVlM2RjOGIzN2EwY2Q0MmQzZThjZTBmNTdjOWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTk5ZmJkNDliZTQ4YmY5ZmQxN2Q0ZGRmOWYyYjMyZmQ0YTk3ZTNhNjYzODlm
|
14
|
+
YmM4ZGI3NTU1M2MxMjYyZTE2ODg2YTQyMmNjNWIzZWRkM2NlMjc4NGU2M2Ew
|
15
|
+
OTY3OThhYzRlMjVjODJlYWUzZWEwNWI4OGU4YWM4YzcwMmQ5NTU=
|
data/Gemfile.lock
CHANGED
@@ -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
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2014-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shoulda
|