archives: raise exception if not configured.

This commit is contained in:
evazion
2017-04-05 00:52:59 -05:00
parent 3f35a9ab64
commit 086b520dcc
5 changed files with 13 additions and 14 deletions

View File

@@ -1,5 +1,6 @@
class PostVersionsController < ApplicationController
before_filter :member_only
before_filter :check_availabililty
respond_to :html, :xml, :json
def index
@@ -25,4 +26,12 @@ class PostVersionsController < ApplicationController
format.js
end
end
private
def check_availabililty
if !PostArchive.enabled?
raise NotImplementedError.new("Archive service is not configured. Post versions are not saved.")
end
end
end