refinerycms-news 0.9.8 → 0.9.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ class NewsItem < ActiveRecord::Base
11
11
 
12
12
  # If you're using a named scope that includes a changing variable you need to wrap it in a lambda
13
13
  # This avoids the query being cached thus becoming unaffected by changes (i.e. Time.now is constant)
14
- named_scope :latest, lambda { { :conditions => ["publish_date < ?", Time.now], :limit => 10 } }
14
+ named_scope :latest, lambda { |*limit| { :conditions => ["publish_date < ?", Time.now], :limit => (limit.first || 10) } }
15
15
  named_scope :published, lambda { { :conditions => ["publish_date < ?", Time.now] } }
16
16
 
17
17
  def not_published? # has the published date not yet arrived?
data/lib/news.rb CHANGED
@@ -2,7 +2,7 @@ module Refinery
2
2
  module News
3
3
  class << self
4
4
  def version
5
- %q{0.9.8}
5
+ %q{0.9.8.1}
6
6
  end
7
7
  end
8
8
  end
data/readme.md CHANGED
@@ -23,7 +23,7 @@ To install the news engine, you can either include the gem or install as a plugi
23
23
 
24
24
  Include the latest [gem](http://rubygems.org/gems/refinerycms-news) into your Refinery CMS application's Gemfile:
25
25
 
26
- gem "refinerycms-news", '~> 0.9.8', :require => "news"
26
+ gem "refinerycms-news", '~> 0.9.8.1', :require => "news"
27
27
 
28
28
  Then type the following at command line inside your Refinery CMS application's root directory:
29
29
 
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-news
3
3
  version: !ruby/object:Gem::Version
4
- hash: 43
4
+ hash: 37
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
9
  - 8
10
- version: 0.9.8
10
+ - 1
11
+ version: 0.9.8.1
11
12
  platform: ruby
12
13
  authors:
13
14
  - Resolve Digital
@@ -15,7 +16,7 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-07-12 00:00:00 +12:00
19
+ date: 2010-07-13 00:00:00 +12:00
19
20
  default_executable:
20
21
  dependencies: []
21
22