app/models/pulitzer/post.rb in pulitzer-0.5.2 vs app/models/pulitzer/post.rb in pulitzer-0.5.3
- old
+ new
@@ -16,9 +16,13 @@
validates :title, presence: true
TAG_MODELS = ["Pulitzer::Tag"] + Pulitzer.tagging_models
+ def active_version!
+ versions.find_by!(status: Pulitzer::Version.statuses[:active])
+ end
+
def tags
post_tags.map(&:label)
end
def should_generate_new_friendly_id?