app/models/spud_post.rb in spud_blog-0.7.0 vs app/models/spud_post.rb in spud_blog-0.7.2
- old
+ new
@@ -4,9 +4,10 @@
: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 = 1 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
\ No newline at end of file