app/models/spud_post.rb in spud_blog-0.8.1 vs app/models/spud_post.rb in spud_blog-0.8.2

- old
+ new

@@ -1,23 +1,21 @@ class SpudPost < ActiveRecord::Base searchable - has_and_belongs_to_many :categories, :class_name => 'SpudPostCategory', :join_table => 'spud_post_categories_posts', :foreign_key => 'spud_post_id' belongs_to :author, :class_name => 'SpudUser', :foreign_key => 'spud_user_id' has_many :comments, :class_name => 'SpudPostComment' has_many :spud_permalinks,:as => :attachment - scope :publicly, where('visible = true AND published_at <= ?', Time.now.utc).order('published_at desc') validates_presence_of :title, :content, :published_at, :spud_user_id, :url_name validates_uniqueness_of :url_name before_validation :set_url_name - attr_accessible :is_news,:published_at,:title,:content,:spud_user_id,:url_name,:visible,:comments_enabled,:meta_keywords,:meta_description + attr_accessible :is_news,:published_at,:title,:content,:spud_user_id,:url_name,:visible,:comments_enabled,:meta_keywords,:meta_description,:category_ids def self.public_posts(page, per_page) return where('visible = ? AND published_at <= ?', true,Time.now.utc).order('published_at desc').includes(:comments, :categories).paginate(:page => page, :per_page => per_page) end \ No newline at end of file