0

I'm trying to add a simple blog to my existing website using the Postmarkdown gem. Unfortunately, I already have a Post model so postmarkdown is conflicting with that namespace

How can I tell postmarkdown to use a different name like BlogPost or something?

Brian
  • 285
  • 2
  • 21

1 Answers1

0

You can change the default route path by modifying the 'postmarkdown' line in routes.rb. For example:

postmarkdown :as => :blog

This will produce the following routes:

http://example.com/blog # lists all posts http://example.com/blog/2011 # lists all posts from 2011 http://example.com/blog/2011/01 # lists all posts from January 2011 http://example.com/blog/2011/01/01 # lists all posts from the 1st of January 2011 http://example.com/blog/2011/01/01/test-post # show the specified post

Alexander
  • 86
  • 3
  • the issue is that Postmarkdown has models/migrations called `Post` and `Taggings` which I already have, so PostMarkdown can't run its own migrations becaues they conflict with my existing ones – Brian Mar 04 '14 at 21:40