Expose created_at and updated_at in pipeline entity
This commit is contained in:
parent
7748282996
commit
6186ac2c3d
|
@ -64,6 +64,8 @@ class PipelineEntity < Grape::Entity
|
|||
pipeline.project, pipeline.id)
|
||||
end
|
||||
|
||||
expose :created_at, :updated_at
|
||||
|
||||
def created_exposure?
|
||||
!incremental? || created?
|
||||
end
|
||||
|
|
|
@ -9,10 +9,6 @@ module RequestAwareEntity
|
|||
@options.fetch(:request)
|
||||
end
|
||||
|
||||
def current_user
|
||||
@options.fetch(:current_user)
|
||||
end
|
||||
|
||||
def can?(object, action, subject)
|
||||
Ability.allowed?(object, action, subject)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue