lib/sunrise/models/post.rb in sunrise-posts-0.1.4 vs lib/sunrise/models/post.rb in sunrise-posts-0.1.5

- old
+ new

@@ -12,9 +12,11 @@ base.send(:include, Utils::Header) base.class_eval do belongs_to :structure validates_presence_of :title, :content + + scope :with_title, lambda {|title| where(["title LIKE ?", "%#{title}%"]) } before_save :make_date end end end