grape-entity
grape-entity copied to clipboard
model name is diffrent of table name an error
hi my project model name is TxhimsPatientInfo ,but my databse table name is patient_infos
class TxhimsPatientInfo < TxhimsModel
self.table_name = "patient_infos"
end
entity name is TxhimsPatientInfoEntity
class TxhimsPatientInfoEntity < Grape::Entity
expose :id, :patient_name
expose :body_description
end
I m used the bottom code has a misstake error ArgumentError (A copy of V1::ExamineReportsAPI has been removed from the module tree but is still active!):
present :data, TxhimsPatientInfo.all, :with => TxhimsPatientInfoEntity
Seems like you have outdated version of your app running in process. Try to restart the server.