qm-acts-as-generic-controller 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ begin
9
9
  gemspec.email = "marcin@saepia.net"
10
10
  gemspec.homepage = "http://q.saepia.net"
11
11
  gemspec.authors = ["Marcin Lewandowski"]
12
- gemspec.version = "0.1.12"
12
+ gemspec.version = "0.1.13"
13
13
  gemspec.files = Rake::FileList.new [ "MIT-LICENSE", "Rakefile", "lib/*", "app/views/generic_controller/*" ]
14
14
  gemspec.add_dependency "qui-common-helpers", ">= 0.0.8"
15
15
  gemspec.add_dependency "qui-index-table", ">= 0.0.8"
@@ -67,7 +67,7 @@ module QM
67
67
  format.html
68
68
  format.xml {
69
69
  if defined?(current_user) and current_user.respond_to? :privileged_attributes
70
- render :xml => instance_variable_get(plural_variable).to_xml(:only => current_user.privileged_attributes(model, :read))
70
+ render :xml => instance_variable_get(plural_variable).to_xml(:only => current_user.privileged_attributes(model, :read) + [:id])
71
71
  else
72
72
  render :xml => instance_variable_get(plural_variable)
73
73
  end
@@ -84,7 +84,7 @@ module QM
84
84
 
85
85
  format.xml {
86
86
  if defined?(current_user) and current_user.respond_to? :privileged_attributes
87
- render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read))
87
+ render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read) + [:id])
88
88
  else
89
89
  render :xml => instance_variable_get(singular_variable)
90
90
  end
@@ -103,7 +103,7 @@ module QM
103
103
  format.html
104
104
  format.xml {
105
105
  if defined?(current_user) and current_user.respond_to? :privileged_attributes
106
- render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read))
106
+ render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read) + [:id])
107
107
  else
108
108
  render :xml => instance_variable_get(singular_variable)
109
109
  end
@@ -137,7 +137,7 @@ module QM
137
137
  end
138
138
  }
139
139
 
140
- format.xml { render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read)), :status => :created, :location => [ section, instance_variable_get(singular_variable) ] }
140
+ format.xml { render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read) + [:id]), :status => :created, :location => [ section, instance_variable_get(singular_variable) ] }
141
141
 
142
142
 
143
143
  else
@@ -157,9 +157,9 @@ module QM
157
157
 
158
158
  format.xml {
159
159
  if defined?(current_user) and current_user.respond_to? :privileged_attributes
160
- render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read)), :status => :created, :location => instance_variable_get(singular_variable)
160
+ render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read) + [:id]), :status => :created, :location => instance_variable_get(singular_variable)
161
161
  else
162
- render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read)), :status => :created, :location => instance_variable_get(singular_variable)
162
+ render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read) + [:id]), :status => :created, :location => instance_variable_get(singular_variable)
163
163
  end
164
164
  }
165
165
  end
@@ -174,7 +174,7 @@ module QM
174
174
  }
175
175
  format.xml {
176
176
  if defined?(current_user) and current_user.respond_to? :privileged_attributes
177
- render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read)), :status => :unprocessable_entity
177
+ render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read) + [:id]), :status => :unprocessable_entity
178
178
  else
179
179
  render :xml => instance_variable_get(singular_variable), :status => :unprocessable_entity
180
180
  end
@@ -212,7 +212,7 @@ module QM
212
212
  }
213
213
  format.xml {
214
214
  if defined?(current_user) and current_user.respond_to? :privileged_attributes
215
- render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read)), :status => :unprocessable_entity
215
+ render :xml => instance_variable_get(singular_variable).to_xml(:only => current_user.privileged_attributes(model, :read) + [:id]), :status => :unprocessable_entity
216
216
  else
217
217
  render :xml => instance_variable_get(singular_variable), :status => :unprocessable_entity
218
218
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qm-acts-as-generic-controller
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 12
10
- version: 0.1.12
9
+ - 13
10
+ version: 0.1.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marcin Lewandowski
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-22 00:00:00 +01:00
18
+ date: 2010-12-03 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency