Skip to content

Commit

Permalink
make sure that a non-markdown post stay non-markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Philippe Boily committed Sep 25, 2012
1 parent b899839 commit 59be040
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/models/monologue/posts_revision_decorator.rb
@@ -1,4 +1,12 @@
Monologue::PostsRevision.class_eval do
before_create do
if self.post.posts_revision_id.nil?
self.is_markdown = true
else
self.is_markdown = self.post.active_revision.is_markdown
end
end

def is_markdown?
self.is_markdown != false
end
Expand Down

0 comments on commit 59be040

Please sign in to comment.