added more legacy api endpoints

This commit is contained in:
albert
2013-01-22 17:42:00 -05:00
parent 5754089c2b
commit e0c563373a
9 changed files with 57 additions and 0 deletions

View File

@@ -97,4 +97,7 @@ class PostVersion < ActiveRecord::Base
PostVersion.where("post_id = ? and id < ?", post_id, id).order("id desc").first
end
def truncated_source
source.gsub(/^http:\/\//, "").sub(/\/.+/, "")
end
end