diff --git a/app/controllers/promoter/payouts_controller.rb b/app/controllers/promoter/payouts_controller.rb new file mode 100644 index 0000000..47e3584 --- /dev/null +++ b/app/controllers/promoter/payouts_controller.rb @@ -0,0 +1,10 @@ +class Promoter::PayoutsController < ApplicationController + def index + end + + def show + end + + def create + end +end diff --git a/app/helpers/promoter/payouts_helper.rb b/app/helpers/promoter/payouts_helper.rb new file mode 100644 index 0000000..c7e9e5a --- /dev/null +++ b/app/helpers/promoter/payouts_helper.rb @@ -0,0 +1,2 @@ +module Promoter::PayoutsHelper +end diff --git a/app/views/promoter/payouts/create.html.erb b/app/views/promoter/payouts/create.html.erb new file mode 100644 index 0000000..ee303e7 --- /dev/null +++ b/app/views/promoter/payouts/create.html.erb @@ -0,0 +1,2 @@ +

Promoter::Payouts#create

+

Find me in app/views/promoter/payouts/create.html.erb

diff --git a/app/views/promoter/payouts/index.html.erb b/app/views/promoter/payouts/index.html.erb new file mode 100644 index 0000000..383dcbd --- /dev/null +++ b/app/views/promoter/payouts/index.html.erb @@ -0,0 +1,2 @@ +

Promoter::Payouts#index

+

Find me in app/views/promoter/payouts/index.html.erb

diff --git a/app/views/promoter/payouts/show.html.erb b/app/views/promoter/payouts/show.html.erb new file mode 100644 index 0000000..daab6a6 --- /dev/null +++ b/app/views/promoter/payouts/show.html.erb @@ -0,0 +1,2 @@ +

Promoter::Payouts#show

+

Find me in app/views/promoter/payouts/show.html.erb

diff --git a/config/routes.rb b/config/routes.rb index 86ab812..ea7db4a 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -78,6 +78,9 @@ Rails.application.routes.draw do # === Promoter Routes === namespace :promoter do + get "payouts/index" + get "payouts/show" + get "payouts/create" resources :events do member do patch :publish diff --git a/db/migrate/20250816145933_devise_create_users.rb b/db/migrate/20250816145933_devise_create_users.rb index 9044049..66474cb 100755 --- a/db/migrate/20250816145933_devise_create_users.rb +++ b/db/migrate/20250816145933_devise_create_users.rb @@ -52,7 +52,8 @@ class DeviseCreateUsers < ActiveRecord::Migration[8.0] # Add onboarding check on user model t.boolean :onboarding_completed, default: false, null: false - # add_column :users, :stripe_connected_account_id, :string + # Link user to Stripe account for promoter payout + t.string :stripe_connected_account_id t.timestamps null: false end diff --git a/db/migrate/20250916215118_add_payout_fields_to_events.rb b/db/migrate/20250916215118_add_payout_fields_to_events.rb deleted file mode 100644 index d97a37e..0000000 --- a/db/migrate/20250916215118_add_payout_fields_to_events.rb +++ /dev/null @@ -1,6 +0,0 @@ -class AddPayoutFieldsToEvents < ActiveRecord::Migration[8.0] - def change - add_column :events, :payout_requested_at, :datetime - add_column :events, :payout_status, :integer - end -end diff --git a/test/controllers/promoter/payouts_controller_test.rb b/test/controllers/promoter/payouts_controller_test.rb new file mode 100644 index 0000000..fd66a2b --- /dev/null +++ b/test/controllers/promoter/payouts_controller_test.rb @@ -0,0 +1,18 @@ +require "test_helper" + +class Promoter::PayoutsControllerTest < ActionDispatch::IntegrationTest + test "should get index" do + get promoter_payouts_index_url + assert_response :success + end + + test "should get show" do + get promoter_payouts_show_url + assert_response :success + end + + test "should get create" do + get promoter_payouts_create_url + assert_response :success + end +end