toast 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -105,10 +105,10 @@ module Toast
105
105
 
106
106
  if @collection != "all"
107
107
  # post on scope?
108
- record = @model_or_relation.create! payload do |obj|
109
- hook = @config_in.before_scoped_create[@collection]
110
- obj.send(hook, @model_or_relation.proxy_association.owner) if hook
111
- end
108
+ record = @model_or_relation.new payload
109
+ hook = @config_in.before_scoped_create[@collection]
110
+ record.send(hook, @model_or_relation.proxy_association.owner) if hook
111
+ record.save!
112
112
  else
113
113
  record = @model_or_relation.create! payload
114
114
  end
data/lib/toast/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Toast
2
- VERSION = '0.7.4'
2
+ VERSION = '0.7.5'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toast
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 4
10
- version: 0.7.4
9
+ - 5
10
+ version: 0.7.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - "robokopp (Robert Anni\xC3\xA9s)"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-07-25 00:00:00 Z
18
+ date: 2012-07-26 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails