service_crud 0.0.2 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -99,7 +99,7 @@ module ServiceCrud
99
99
  respond_to do |format|
100
100
  if @model.send self.class.orm_methods.save
101
101
  run_service_crud_after_callbacks @model
102
- location = "/#{controller_name}/#{@model.id}"
102
+ location = "/#{controller_name}/#{CGI.escape(@model.id)}"
103
103
  format.xml { render :xml => @model, :status => :created, :location => location }
104
104
  format.json { render :json => @model, :status => :created, :location => location }
105
105
  else
@@ -112,7 +112,7 @@ module ServiceCrud
112
112
  # PUT /your_model/1.xml
113
113
  # PUT /your_model/1.json
114
114
  def update
115
- @model = self.class.model.send self.class.orm_methods.find, params[:id]
115
+ @model = self.class.model.send self.class.orm_methods.find, CGI.unescape(params[:id])
116
116
  run_service_crud_before_callbacks @model
117
117
 
118
118
  respond_to do |format|
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: service_crud
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Parker
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-17 00:00:00 -05:00
18
+ date: 2011-01-11 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency