sinatra-backstage 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f38990ceed04f5e26fd59f593461786e63250a26
4
- data.tar.gz: 7cfcc7a49f875b6e1982e6b62fd97a32ff4f5641
3
+ metadata.gz: 874df067c1f31e0fa5c8913f9968b5d375eeb4a3
4
+ data.tar.gz: f985613fd20fc61bc2ee0e01910288500b116411
5
5
  SHA512:
6
- metadata.gz: 607f0519ffec06e07ed5c777ece6d620212901beccf4eddb1ab0cc9452e387c0468fd987955e31effc27056314ad7700518c463bd84c6acab7d7c2ac36fb584d
7
- data.tar.gz: 04ddd276294b25f50b3983ae7f3f0a30c2640c8842c3b8cfdb6e950cf45c675cc417a1656cb24894962685fde399993ac3892cc8006ffa1019ba86e31e6318f5
6
+ metadata.gz: e9ee548654babda6cea1d9ba5f7849ecd03485d1c35974c997140f4b3cf89ff21b1f5ddb2d9a4e69526ff87a170f947e39301291d776efd6340920cb8cb2d828
7
+ data.tar.gz: f68d0ee1bb05a71d7929b7131193ef08dabb1b3b41f2aae85587b77dcd2e1050319f3d8bb191a9335240b3993fafb49a18d282d30015a1c8cca7bd07a688dd9b
@@ -50,11 +50,10 @@ module Sinatra
50
50
  rescue DataMapper::SaveFailureError => e
51
51
  puts e.resource.errors.inspect
52
52
  e.resource.errors.each do |error|
53
- puts error.inspect
53
+ puts "-- REST.Routing new ( error = #{error} )"
54
54
  @errors << error
55
55
  end
56
56
  @errors.flatten!
57
- puts @errors.inspect
58
57
  end
59
58
  end
60
59
 
@@ -12,15 +12,18 @@ module Sinatra
12
12
  helpers Sinatra::Backstage::StoredFile::Helper
13
13
 
14
14
  ## Add logo after create franchise
15
- before namespace, :method => :post do
15
+ before "#{namespace}/new", :method => :post do
16
16
  if params[:object][field_name]
17
17
  begin
18
+ # puts "-- StoredFile before new ( params[:object] = #{params[:object]}"
18
19
  attachment = params[:object].delete(field_name)
19
20
  attachment_attrs = get_attachment_attrs(attachment)
21
+ # puts "-- StoredFile before new ( attachment_attrs = #{attachment_attrs}"
20
22
  params[:object][field_name] = child_klass.create(
21
23
  attachment_attrs,
22
24
  attachment[:tempfile]
23
25
  )
26
+ # puts "-- StoredFile before new ( result params[:object] = #{params[:object]}"
24
27
  rescue DataMapper::SaveFailureError => e
25
28
  puts e.resource.errors.inspect
26
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-backstage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Popov