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 "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") |
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 class="card"> | |
<div class="card-header"> | |
<h3 class="card-title"> | |
<%= notification.to_notification.in_app_subject %> | |
</h3> | |
</div> | |
<div class="card-body"> | |
<%= notification.to_notification.in_app_body %> | |
</div> | |
</div> |
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 Jobbable | |
extend ActiveSupport::Concern | |
# This concern allows model instances to run async jobs that depend on them. | |
# Calling #async_method_name will trigger the MethodNameJob | |
PREFIX = "async_" | |
included do | |
def method_missing(method_name) |
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
const purgecss = require('@fullhuman/postcss-purgecss')({ | |
content: [ | |
'./app/**/*.html.erb', | |
'./app/helpers/**/*.rb', | |
'./app/javascript/**/*.js', | |
], | |
defaultExtractor: content => { | |
const broadMatches = content.match(/[^<>"'`\s]*[^<>"'`\s:]/g) || [] | |
const innerMatches = content.match(/[^<>"'`\s.()]*[^<>"'`\s.():]/g) || [] | |
return broadMatches.concat(innerMatches) |
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
URI.open(url) do |uri| | |
base_uri = uri.base_uri | |
listable_type = case base_uri.to_s | |
when /soundcloud.com\/(?<artist>.+)\/tracks/ | |
raise UnparsableTrackUrlError | |
when /soundcloud.com\/(?<artist>.+)\/sets\/(?<title>.+)/ | |
SoundCloudPlaylist | |
when /soundcloud.com\/(?<artist>.+)\/(?<title>.+)/ | |
SoundCloudTrack |
OlderNewer