diff options
Diffstat (limited to 'app/controllers/file_validations_controller.rb')
| -rw-r--r-- | app/controllers/file_validations_controller.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/file_validations_controller.rb b/app/controllers/file_validations_controller.rb index cc50a7499..274d11f9f 100644 --- a/app/controllers/file_validations_controller.rb +++ b/app/controllers/file_validations_controller.rb @@ -1,23 +1,36 @@ class FileValidationsController < InheritedResources::Base respond_to :html, :xml, :json + def index + no_referential + index! + end + def show + no_referential @toc = TestSheetPage.find("toc") show! end def new + no_referential @toc = TestSheetPage.find("toc") new! end def create + no_referential create! do |success, failure| success.html { redirect_to file_validations_path } end end + protected + def no_referential + Apartment::Database.switch("public") + end + def resource @file_validation ||= current_organisation.file_validations.find_by_id(params[:id]) end |
