spec/models/category.rb in bullet-4.14.2 vs spec/models/category.rb in bullet-4.14.3
- old
+ new
@@ -1,6 +1,10 @@
class Category < ActiveRecord::Base
has_many :posts, inverse_of: :category
has_many :entries
has_many :users
+
+ def draft_post
+ posts.draft.first_or_create
+ end
end