You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in my use case I have several Her model so I created the following super class
class HerModel
include Her::JsonApi::Model
def created_at
@created_at ||= Time.zone.parse(super)
end
end
and classes like this
class CollectorContent < HerModel
use_api COLLECTOR_CONTENTS_WS_API
collection_path "collector/:collector_id/collector_contents"
type :collector_contents
end
In order to have the CollectorContent created_at attribute overridden I need to define it in every child class:
class CollectorContent < HerModel
use_api COLLECTOR_CONTENTS_WS_API
collection_path "collector/:collector_id/collector_contents"
type :collector_contents
def created_at
@created_at ||= Time.zone.parse(super)
end
end
am I missing anything?
The text was updated successfully, but these errors were encountered:
in my use case I have several Her model so I created the following super class
and classes like this
In order to have the CollectorContent
created_at
attribute overridden I need to define it in every child class:am I missing anything?
The text was updated successfully, but these errors were encountered: