Don’t rely on a decorator for ProcedureSerializer#geographic_information
This commit is contained in:
parent
2e7a4a4098
commit
53a261f424
4 changed files with 5 additions and 12 deletions
|
@ -2,7 +2,7 @@ class API::V1::ProceduresController < APIController
|
|||
before_action :fetch_procedure_and_check_token
|
||||
|
||||
def show
|
||||
render json: { procedure: ProcedureSerializer.new(@procedure.decorate).as_json }
|
||||
render json: { procedure: ProcedureSerializer.new(@procedure).as_json }
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -22,8 +22,4 @@ class ProcedureDecorator < Draper::Decorator
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
def geographic_information
|
||||
module_api_carto
|
||||
end
|
||||
end
|
||||
|
|
|
@ -31,4 +31,8 @@ class ProcedureSerializer < ActiveModel::Serializer
|
|||
def state
|
||||
object.aasm_state
|
||||
end
|
||||
|
||||
def geographic_information
|
||||
object.module_api_carto
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue