View fast-lookup.rb
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
require "active_support/all" | |
Resource = Struct.new(:absolute_path) | |
paths = [ | |
Resource.new("/bread/crumbs/three"), | |
Resource.new("/bread"), | |
Resource.new("/bread/crumbs"), | |
Resource.new("/bread/crumbs/one"), | |
Resource.new("/bread/crumbs/two"), |
View avo-test-helpers.rb
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
def avo_flatpickr_pick(selector, with:) | |
base_field = find(selector, visible: false) | |
flatpickr_field_identifier = base_field["data-resource-edit-target"] | |
flatpickr_field = find("[data-resource-edit-target='#{flatpickr_field_identifier}'].flatpickr-input", visible: false) | |
new_selector_id = flatpickr_field["id"] | |
flatpickr_pick("##{new_selector_id}", with: with) | |
end | |
def avo_tagify_select(field_selector, with:, retries: 3) | |
raise("Unable to select '#{with}' from '#{field_selector}'") if retries == 0 |
View sales_list_organization_csv_download.rb
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
# frozen_string_literal: true | |
class SalesListOrganizationCsvDownload < Avo::BaseAction | |
self.name = "CSV Download" | |
self.may_download_file = true | |
self.confirm_button_label = "Download" | |
def handle(**args) | |
_models, _fields, _current_user, resource = args.values_at(:models, :fields, :current_user, :resource) |
View goal_and_strategies.rb
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
class Base | |
def initialize(id) | |
@id = id | |
end | |
def name | |
"#{self.class.name} #{@id}" | |
end | |
end |
View render.com.log
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
Mar 10 09:56:57 PM ==> Cloning from https://github.com/mission-met/bridgetown-test... | |
Mar 10 09:56:57 PM ==> Checking out commit 8942612de1fb5c174fbbf51067e51ca6172d6f5d in branch main | |
Mar 10 09:56:59 PM ==> Downloading cache... | |
Mar 10 09:57:10 PM ==> Downloaded 177MB in 5s. Extraction took 4s. | |
Mar 10 09:57:15 PM ==> Installing dependencies with Yarn... | |
Mar 10 09:57:15 PM yarn install v1.22.17 | |
Mar 10 09:57:15 PM [1/4] Resolving packages... | |
Mar 10 09:57:15 PM success Already up-to-date. | |
Mar 10 09:57:15 PM Done in 0.16s. | |
Mar 10 09:57:15 PM ==> Installing dependencies with bundler... |
View trace.log
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
Feb 21 18:20:41 app-name app/web.1 #<Thread:0x00007fe73838ea10 /app/vendor/bundle/ruby/3.0.0/bundler/gems/thredded-9a7158d4a307/lib/thredded/collection_to_strings_with_cache_renderer.rb:84 run> terminated with exception (report_on_exception is true): | |
Feb 21 18:20:41 app-name app/web.1 /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:210:in `block in wait_poll': could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use (ActionView::Template::Error) | |
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:199:in `loop' | |
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:199:in `wait_poll' | |
Feb 21 18:20:41 app-name app/web.1 from /app/vendor/bundle/ruby/3.0.0/gem |
View slim_select_controller.js
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
import { Controller } from "stimulus" | |
import SlimSelect from "slim-select" | |
import "slim-select/dist/slimselect.min.css" | |
import "../style/slimselect-customized.css" | |
export default class extends Controller { | |
connect() { | |
const limit = this.data.get("limit") | |
const placeholder = this.data.get("placeholder") | |
const searchText = this.data.get("no-results") |
View slim_select_helper.rb
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
## from @dinshaw in https://github.com/brianvoe/slim-select/pull/246 | |
## Assumption is that you have a label who's parent also contains the select list you are choosing from. | |
def js_select(item_text, options) | |
container = find(:xpath, "//parent::*[label[text()='#{options[:from]}']]") | |
within "##{container[:id]}", visible: false do | |
find('.ss-arrow').click | |
input = find(".ss-search input").native | |
input.send_keys(item_text) | |
find('div.ss-list').click |
View example-flexbox-row.html
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
<div class="container"> | |
<div class="d-flex flex-row mb-3 align-items-start"> | |
<div class="d-inline-flex align-items-center"> | |
<div class="m-1 p-1" style="height:15px; border: 1px solid;"></div> | |
<div class="m-1 p-1" style="height:20px; border: 1px solid;"></div> | |
<div class="m-1 p-1" style="height:15px; border: 1px solid;"></div> | |
</div> | |
<div class="p-1 bd-highlight"> | |
<div class="d-flex flex-column"> | |
<div class="px-1 mx-1" style="height:50px; border: 1px solid;">Top</div> |
NewerOlder