Expose created_at and updated_at in pipeline entity

This commit is contained in:
Grzegorz Bizon 2016-11-12 10:05:57 +01:00
parent 7748282996
commit 6186ac2c3d
2 changed files with 2 additions and 4 deletions

View File

@ -64,6 +64,8 @@ class PipelineEntity < Grape::Entity
pipeline.project, pipeline.id)
end
expose :created_at, :updated_at
def created_exposure?
!incremental? || created?
end

View File

@ -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