refinerycms-news 0.9.9 → 0.9.9.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.
@@ -1,6 +1,7 @@
1
1
  class NewsItemsController < ApplicationController
2
2
 
3
3
  before_filter :find_latest_news_items, :find_page
4
+ before_filter :find_published_news_items, :find_page, :only => [:index]
4
5
  before_filter :find_news_item, :only => [:show]
5
6
 
6
7
  protected
@@ -9,6 +10,10 @@ protected
9
10
  @news_items = NewsItem.latest.paginate(:page => params[:page]) # 10 items
10
11
  end
11
12
 
13
+ def find_published_news_items
14
+ @news_items = NewsItem.published.paginate(:page => params[:page])
15
+ end
16
+
12
17
  def find_news_item
13
18
  @news_item = NewsItem.published.find(params[:id])
14
19
  end
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.9}
5
+ %q{0.9.9.1}
6
6
  end
7
7
  end
8
8
  end
data/readme.md CHANGED
@@ -11,10 +11,6 @@ Key features:
11
11
  * Default news page shows a summary of recent news posts
12
12
  * Detail view shows the full post and also linked to recent news on the "side bar"
13
13
 
14
- ## How do I use it?
15
-
16
- To install the news engine, you can either include the gem or install as a plugin.
17
-
18
14
  ## Requirements
19
15
 
20
16
  [RefineryCMS](http://refinerycms.com) version 0.9.8 or later.
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: 41
4
+ hash: 33
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
9
  - 9
10
- version: 0.9.9
10
+ - 1
11
+ version: 0.9.9.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-09-09 00:00:00 +12:00
19
+ date: 2010-09-16 00:00:00 +12:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency