app/models/pulitzer/post.rb in pulitzer-0.0.3 vs app/models/pulitzer/post.rb in pulitzer-0.0.4
- old
+ new
@@ -2,12 +2,13 @@
class Post < ActiveRecord::Base
extend ::FriendlyId
belongs_to :post_type
has_many :content_elements, dependent: :destroy
has_many :post_tags, dependent: :destroy
- has_many :tags, through: :post_tags
delegate :post_type_content_element_types, to: :post_type
friendly_id :title, use: [:slugged, :finders]
+
+ TAG_MODELS = ["Pulitzer::Tag"] + Pulitzer.tagging_models
def content_element(label)
self.content_elements.find_by(label: label)
end