inline_forms 1.3.32 → 1.3.33

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,6 +20,7 @@ def dropdown_edit(object, attribute)
20
20
  end
21
21
 
22
22
  def dropdown_update(object, attribute)
23
- object[attribute.to_s.foreign_key.to_sym] = params[('_' + object.class.to_s.underscore).to_sym][attribute.to_s.foreign_key.to_sym]
23
+ foreign_key = object.association(attribute.to_sym).reflection.options[:foreign_key]
24
+ object[foreign_key] = params[('_' + object.class.to_s.underscore).to_sym][attribute.to_s.foreign_key.to_sym]
24
25
  end
25
26
 
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "1.3.32"
3
+ VERSION = "1.3.33"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.32
4
+ version: 1.3.33
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-05-17 00:00:00.000000000 Z
12
+ date: 2012-05-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec-rails