2018-10-05 18:36:20 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class DiffViewerEntity < Grape::Entity
|
|
|
|
# Partial name refers directly to a Rails feature, let's avoid
|
|
|
|
# using this on the frontend.
|
|
|
|
expose :partial_name, as: :name
|
2018-12-13 12:49:05 -05:00
|
|
|
expose :error do |diff_viewer|
|
|
|
|
diff_viewer.render_error_message
|
|
|
|
end
|
2018-10-05 18:36:20 -04:00
|
|
|
end
|