classiccms 0.5.8 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -62,7 +62,10 @@ module Classiccms
62
62
  items = Base.where(_id: id)
63
63
  if items.count > 0
64
64
  item = items.first
65
- item.connections.where(:section => section).update_all(:order_id => index+1)
65
+ item.connections.where(:section => section).each do |connection|
66
+ connection.update_attribute(:order_id, index+1)
67
+ end
68
+ item.save
66
69
  end
67
70
  end
68
71
  end
@@ -70,7 +73,6 @@ module Classiccms
70
73
  post '/save' do
71
74
  content_type :json
72
75
  errors = []
73
- p params
74
76
  params.each do |key, value|
75
77
  begin
76
78
  if value['id'] != nil
@@ -78,7 +80,6 @@ module Classiccms
78
80
  else
79
81
  record = Kernel.const_get(key).new
80
82
  end
81
- p value
82
83
  record.update_attributes(value)
83
84
  rescue TypeError
84
85
  end
@@ -1,3 +1,3 @@
1
1
  module Classiccms #:nodoc
2
- VERSION = "0.5.8"
2
+ VERSION = "0.5.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classiccms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-13 00:00:00.000000000 Z
12
+ date: 2012-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec