2018-12-05 23:21:45 +05:30
|
|
|
# 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
|
2019-02-13 22:33:31 +05:30
|
|
|
expose :error do |diff_viewer|
|
|
|
|
diff_viewer.render_error_message
|
|
|
|
end
|
2018-12-05 23:21:45 +05:30
|
|
|
end
|