Last active
November 25, 2016 22:54
-
-
Save fatihorhan/860867fd9a04e63a64e3c88412848c64 to your computer and use it in GitHub Desktop.
Bad sample controller with non-CRUD methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/controllers/payments_controller.rb | |
class PaymentsController < ApplicationController | |
skip_before_action :verify_authenticity_token, :only => :bank_return | |
before_action :prevent_blocked_account, only: :create | |
def index | |
end | |
def show | |
end | |
def create | |
end | |
def track_cc | |
end | |
def bank_return | |
end | |
private | |
def payment_params | |
end | |
def bank_return_params | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/routes.rb | |
Rails.application.routes.draw do | |
# ... | |
resources :payments do | |
collection do | |
post :track_cc | |
post :bank_return | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment