sunrise-posts 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -5,3 +5,5 @@
5
5
  rails generate sunrise:posts:install
6
6
 
7
7
  rake db:migrate
8
+
9
+ Copyright (c) 2011 Aimbulance, released under the MIT license
@@ -17,6 +17,6 @@ class PostSweeper < ActionController::Caching::Sweeper
17
17
 
18
18
  def expire(item=nil)
19
19
  expire_fragment(%r{/posts})
20
- StructureSweeper.sweep!
20
+ Sunrise::Utils.clear_cache
21
21
  end
22
22
  end
@@ -1,7 +1,9 @@
1
1
  class Post < ActiveRecord::Base
2
2
  include Sunrise::Models::Post
3
3
 
4
+ has_many :comments, :as => :commentable, :dependent => :delete_all
5
+
4
6
  attr_accessible :published_at, :content, :title
5
7
 
6
- # scope :visible, where(:is_visible => true)
8
+ scope :recently, order("#{quoted_table_name}.published_at DESC")
7
9
  end
@@ -12,7 +12,6 @@ module Sunrise
12
12
  base.send(:include, Utils::Header)
13
13
  base.class_eval do
14
14
  belongs_to :structure
15
- has_many :comments, :as => :commentable, :dependent => :delete_all
16
15
 
17
16
  validates_presence_of :title, :content
18
17
 
@@ -1,5 +1,5 @@
1
1
  module Sunrise
2
2
  module Posts
3
- VERSION = "0.1.2".freeze
3
+ VERSION = "0.1.3".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunrise-posts
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Igor Galeta
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-07-27 00:00:00 +03:00
19
+ date: 2011-08-05 00:00:00 +03:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency