publishable 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/publishable.rb +2 -2
- data/publishable.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/publishable.rb
CHANGED
@@ -10,9 +10,9 @@ module Publishable
|
|
10
10
|
|
11
11
|
named_scope :published, lambda { |*args|
|
12
12
|
if args.first.nil? || TRUE_VALUES.include?(args.first)
|
13
|
-
{ :conditions => ["#{quoted_table_name}
|
13
|
+
{ :conditions => ["#{quoted_table_name}.#{publishable_column} IS NOT NULL AND #{quoted_table_name}.#{publishable_column} <= ?", Time.now.utc] }
|
14
14
|
else
|
15
|
-
{ :conditions => ["#{quoted_table_name}
|
15
|
+
{ :conditions => ["#{quoted_table_name}.#{publishable_column} IS NULL OR #{quoted_table_name}.#{publishable_column} > ?", Time.now.utc] }
|
16
16
|
end
|
17
17
|
}
|
18
18
|
|
data/publishable.gemspec
CHANGED