immortal 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +1 -0
- data/immortal.gemspec +1 -1
- data/lib/immortal.rb +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/immortal.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "immortal"
|
6
|
-
s.version = '0.1.
|
6
|
+
s.version = '0.1.3'
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.authors = ["Jordi Romero", "Saimon Moore"]
|
9
9
|
s.email = ["jordi@jrom.net", "saimon@saimonmoore.net"]
|
data/lib/immortal.rb
CHANGED
@@ -48,7 +48,7 @@ module Immortal
|
|
48
48
|
# the 'not deleted' scope, otherwise it will take all the rows
|
49
49
|
# from the join model
|
50
50
|
def has_many(association_id, options = {}, &extension)
|
51
|
-
if options.key?(:through)
|
51
|
+
if options.key?(:through) and options[:through].to_s.classify.constantize.arel_table[:deleted]
|
52
52
|
conditions = "#{options[:through].to_s.pluralize}.deleted IS NULL OR #{options[:through].to_s.pluralize}.deleted = ?"
|
53
53
|
options[:conditions] = ["(" + [options[:conditions], conditions].compact.join(") AND (") + ")", false]
|
54
54
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: immortal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jordi Romero
|