This file contains hidden or 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
| #====================== | |
| # Setup | |
| #====================== | |
| docker compose -f $CONDUCTOR_ROOT_PATH/docker-compose.yml up -d | |
| sed -e "s/^DATABASE_PREFIX=$/DATABASE_PREFIX=${CONDUCTOR_WORKSPACE_NAME}-/" \ | |
| "$CONDUCTOR_ROOT_PATH/.env.development" > .env.development | |
| sed -e "s/^DATABASE_PREFIX=$/DATABASE_PREFIX=${CONDUCTOR_WORKSPACE_NAME}-/" \ | |
| "$CONDUCTOR_ROOT_PATH/.env.test" > .env.test |
This file contains hidden or 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
| <div data-controller="simple-countdown" data-simple-countdown-deadline-value="2026-02-03T00:00:00Z" class="leading-relaxed text-center text-[#2672B5] mb-12"> | |
| <div class="flex justify-center items-start gap-1 sm:gap-2 font-mono font-bold"> | |
| <div class="flex flex-col items-center"> | |
| <span class="text-[#2672B5] text-sm sm:text-base mb-2 uppercase tracking-wider">Days</span> | |
| <div class="flex gap-1"> | |
| <span data-simple-countdown-target="days" class="bg-[#1a1a1a] text-white text-3xl sm:text-5xl rounded px-2 sm:px-3 py-2 sm:py-4 tracking-wider">00</span> | |
| </div> | |
| </div> | |
| <span class="text-[#1a1a1a] text-3xl sm:text-5xl mt-8 sm:mt-10">:</span> | |
| <div class="flex flex-col items-center"> |
This file contains hidden or 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
| module SolidFlow | |
| class WorkflowJob < ActiveJob::Base | |
| delegate :run, :in_parallel, to: :workflow | |
| queue_as :default | |
| def perform(*args) | |
| build(*args) | |
| StepExecutor.new(workflow.serialized, 0, batch).execute |
This file contains hidden or 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
| import { Controller } from "@hotwired/stimulus"; | |
| export default class extends Controller { | |
| static values = { highlighted: Boolean }; | |
| static classes = ["highlighted"]; | |
| toggle() { | |
| this.highlightedValue = !this.highlightedValue; | |
| } |
This file contains hidden or 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
| # Example Usage | |
| # data: stimulus_data( | |
| # autosubmit: { controller: true }, | |
| # toggle: { controller: true, classes: { checked: "highlighted", unchecked: "unhighlighted" } }, | |
| # sortable: { target: "sortBy", actions: { click: "sort" }, | |
| # ).merge(other: "stuff") | |
| class StimulusData | |
| def initialize(**controllers) | |
| @controllers = controllers |
This file contains hidden or 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
| class PaymentsController < ApplicationController | |
| CHECKOUT_SESSION_ID_KEY = :checkout_session_id | |
| before_action :authenticate_user! | |
| def new | |
| stripe_customer = find_or_create_stripe_customer | |
| checkout_session = create_checkout_session(stripe_customer) | |
| redirect_to checkout_session.url, allow_other_host: true |
This file contains hidden or 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
| <%= tag.div data: { controller: "autosuggest", action: "autosuggest:click:outside->autosuggest#hide" }, class: "relative" do %> | |
| <%= f.text_field :subject, autocomplete: "off", data: { autosuggest_target: "input", action: "input->autosuggest#search focus->autosuggest#search keydown.up->autosuggest#arrowSearch keydown.down->autosuggest#arrowSearch keydown.esc->autosuggest#hide" } %> | |
| <%= tag.ul role: "listbox", hidden: true, data: { autosuggest_target: "list", action: "combobox-commit->autosuggest#commit" }, class: "z-40 absolute w-full max-h-60 overflow-auto mt-1 rounded border border-gray-300 shadow-lg p-1 bg-white" do %> | |
| <% @subjects.each do |subject| %> | |
| <%= tag.li subject.name, role: "option", id: dom_id(subject, :listbox), data: { autosuggest_target: "item" }, class: "w-full text-left cursor-pointer p-2 hover:bg-gray-100 aria-selected:bg-gray-100 aria-selected:font-semibold" %> | |
| <% end %> | |
| <% end %> | |
| <% end %> |
This file contains hidden or 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
| <%= form_with(model: topic_form, url: spaced_topics_path) do |form| %> | |
| <div class="mb-4"> | |
| <%= form.label :title %> | |
| <%= form.text_field :title, data: { session_resume_target: "resumeable" } %> | |
| <%= form.error :title %> | |
| </div> | |
| <div class="mb-2"> | |
| <%= form.label :body, class: "sr-only" %> | |
| <%= form.markdown_text_area :body, data: { session_resume_target: "resumeable" } %> |
This file contains hidden or 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
| class User | |
| has_many :subscriptions | |
| has_many :followings | |
| end | |
| class Channel | |
| has_many :topics | |
| has_many :subscriptions | |
| end |
This file contains hidden or 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
| Rails.application.config.to_prepare do | |
| ActiveStorage::Attachment.class_eval do | |
| private | |
| def transform_variants_later | |
| if record.respond_to?(:calculated_variants) | |
| record.calculated_variants[name.to_sym]&.values.each do |transformations| | |
| blob.preprocessed(transformations) | |
| end | |
| end |
NewerOlder