chore: init commit

in worker.../repo/GITFOLDER.zip is the .git folder.
This commit is contained in:
2026-08-11 14:44:09 -04:00
parent 0012380fd3
commit 392781f7aa
781 changed files with 65944 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
# frozen_string_literal: true
class StocksController < ApplicationController
before_action :set_stock, only: %i[show]
before_action :authenticate_user!
before_action :set_portfolio
def index
@stocks = policy_scope(Stock).includes(portfolio_stocks: :portfolio)
@portfolio = current_user.portfolio if current_user.student?
end
def show
authorize @stock
end
private
def set_portfolio
@portfolio = current_user.portfolio
end
def set_stock
@stock = Stock.find(params.expect(:id))
end
end