acts-as-joinable 0.1.6 → 0.1.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/acts_as_joinable/core.rb +2 -1
  3. metadata +3 -2
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'rake/gempackagetask'
5
5
  spec = Gem::Specification.new do |s|
6
6
  s.name = "acts-as-joinable"
7
7
  s.authors = ["Lance Pollard"]
8
- s.version = "0.1.6"
8
+ s.version = "0.1.6.1"
9
9
  s.summary = "ActsAsJoinable: DRYing up Many-to-Many Relationships in ActiveRecord"
10
10
  s.homepage = "http://github.com/viatropos/acts-as-joinable"
11
11
  s.email = "lancejpollard@gmail.com"
@@ -187,7 +187,8 @@ module ActsAsJoinable
187
187
  send(singular_type).id rescue nil
188
188
  end
189
189
  define_method "#{singular_type}_id=" do |id|
190
- send("#{singular_type}=", class_name.constantize.find_by_id(id))
190
+ item = id.blank? ? nil : class_name.constantize.find_by_id(id)
191
+ send("#{singular_type}=", item)
191
192
  end
192
193
  end
193
194
 
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts-as-joinable
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 93
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
9
  - 6
10
- version: 0.1.6
10
+ - 1
11
+ version: 0.1.6.1
11
12
  platform: ruby
12
13
  authors:
13
14
  - Lance Pollard