Files
velour/app/controllers/works_controller.rb
Dan Milne 88a906064f
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled
Much base work started
2025-10-31 14:36:14 +11:00

19 lines
342 B
Ruby

class WorksController < ApplicationController
before_action :set_work, only: [:show]
def index
@works = Work.includes(:videos).recent
end
def show
@videos = @work.videos.includes(:storage_location).recent
@primary_video = @work.primary_video
end
private
def set_work
@work = Work.find(params[:id])
end
end