Class: SoftValidationsController

Inherits:
ApplicationController show all
Includes:
DataControllerConfiguration::ProjectDataControllerConfiguration
Defined in:
app/controllers/soft_validations_controller.rb

Instance Method Summary collapse

Methods included from DataControllerConfiguration::ProjectDataControllerConfiguration

#annotator_params

Methods included from RequestType

#json_request?

Methods included from LogRecent

#log_user_recent_route

Methods included from Cookies

#digest_cookie, #digested_cookie_exists?

Methods included from Whitelist

#whitelist_constantize

Methods included from ProjectsHelper

#invalid_object, #project_link, #project_matches, #project_tag, #projects_list, #projects_search_form

Methods included from Api::Intercept

#intercept_api

Instance Method Details

#fixObject

POST /soft_validations/fix?global_id=<>



16
17
18
19
20
21
22
# File 'app/controllers/soft_validations_controller.rb', line 16

def fix
  @object.soft_validate
  @object.fix_soft_validations
  render json: {
    validations: @object.soft_validations
  }
end

#get_objectObject (protected)



26
27
28
# File 'app/controllers/soft_validations_controller.rb', line 26

def get_object
  @object = GlobalID::Locator.locate(URI.decode(params[:global_id]))
end

#validateObject

GET /soft_validations/validate



7
8
9
10
11
12
13
# File 'app/controllers/soft_validations_controller.rb', line 7

def validate
  @object.soft_validate
  render json: {
    validations: @object.soft_validations
  }

end