asm-products/verba

View on GitHub
app/controllers/refunds_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
class RefundsController < ApplicationController
  def create
    return if !current_user.eligible_for_refund?

    @refund = Refund.new(user_id: current_user.id)

    if @refund.save
      redirect_to edit_user_path(current_user),
        notice: "You will be refunded in 5-10 days!"
    end
  end
end