Please sign in to comment.
Add tumblr_guid to posts
Since I'm porting this blog over from a tumblr blog, I don't want people to see all the same posts twice. RSS clients should (theoretically) be using the guid of the RSS item to determine post uniqueness. My hope is that if I can maintain the guid's that tumblr uses, readers won't get notified that all posts are unread. The guids will look like this if a tumblr_guid is present: 'http://blog.edwardloveall.com/posts/12345678' and if no tumblr_guid is present, it will create this kind of guid using the posts's slug: 'com.edwardloveall.blog.hello-world' This hierarchical notation works well for apps, so I thought it may work well for post guids. Each post's slug is both required and unique.
- Loading branch information...
Showing with 36 additions and 3 deletions.
- +8 −0 app/models/post.rb
- +5 −0 db/migrate/20160824190847_add_tumblr_guid_to_posts.rb
- +4 −3 db/schema.rb
- +19 −0 spec/models/post_spec.rb
|@@ -0,0 +1,5 @@|
|class AddTumblrGuidToPosts < ActiveRecord::Migration|
|add_column :posts, :tumblr_guid, :string|