support-foo/web

View on GitHub
app/serializers/base_serializer.rb

Summary

Maintainability
A
0 mins
Test Coverage
class BaseSerializer < ActiveModel::Serializer
  include TimestampedSerializer

  attributes :id, :type

  def type
    object.class.name.downcase
  end

  def url_helpers
    Rails.application.routes.url_helpers
  end

  def current_user
    scope.current_user
  end

  def current_account
    scope.current_account
  end
end