|
|
@ -1,5 +1,5 @@ |
|
|
|
class CaseLogsController < ApplicationController |
|
|
|
class CaseLogsController < ApplicationController |
|
|
|
skip_before_action :verify_authenticity_token |
|
|
|
skip_before_action :verify_authenticity_token, only: [:create], if: :json_request? |
|
|
|
|
|
|
|
|
|
|
|
def index |
|
|
|
def index |
|
|
|
@submitted_case_logs = CaseLog.where(status: 1) |
|
|
|
@submitted_case_logs = CaseLog.where(status: 1) |
|
|
@ -72,6 +72,10 @@ private |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def json_request? |
|
|
|
|
|
|
|
request.format.json? |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def create_params |
|
|
|
def create_params |
|
|
|
return {} unless params[:case_log] |
|
|
|
return {} unless params[:case_log] |
|
|
|
|
|
|
|
|
|
|
|