Codeminer42/Punchclock

View on GitHub
app/controllers/api/v1/contributions_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module Api
  module V1
    class ContributionsController < ActionController::API
      def latest
        contributions = Contribution.approved.order(id: :desc).first(25)
        render json: contributions, only: :link
      end
    end
  end
end