"dependencies": { "cable_ready": "TBD", "mrujs": "TBD" }
View irbr.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
#!/usr/bin/env ruby | |
# irbr (short for "IRB Recorder") | |
# | |
# Starts an IRB session and appends your history to the specified file | |
# or "scratch.rb" by default | |
# | |
# USAGE irbr.rb output.rb | |
require "irb" |
View application.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 "my-gem" |
View update_standard_todo.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
#!/usr/bin/env ruby | |
require 'pathname' | |
require "tempfile" | |
require "fileutils" | |
base = ENV.fetch("STANDARD_UPDATE_BASE") { "$HEAD" } | |
files = `git diff #{base} --name-only --staged`.split("\n") | |
app_root = Pathname.new File.expand_path('../../', __FILE__) |
View confirmation-modal-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"; | |
export default class extends Controller { | |
connect() { | |
this.element[this.identifier + "-controller"] = this; | |
} | |
confirm() { | |
return new Promise((resolve, reject) => { | |
this.confirmationResolve = resolve; |
View modal_component.html.erb
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="modal fade" id="<%= dom_id %>" role="dialog" tabindex="-1"> | |
<div class="modal-dialog" role="document"> | |
<div class="modal-content"> | |
<% if header %> | |
<div class="modal-header"> | |
<%= header %> | |
<%- if header_close_btn %> | |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
<i class="fa fa-times-circle"></i> | |
</button> |
View application_controller.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
# app/controllers/application_controller.rb | |
class ApplicationController < ActionController::Base | |
before_action :set_current_user | |
private def set_current_user | |
Current.user = current_user | |
end | |
end |
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"; | |
export default class extends Controller { | |
connect() { | |
this.slimSelect = new SlimSelect({ | |
select: this.element, | |
addToBody: true | |
}); | |
} |
View synchronous_job.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 SynchronousJob < ApplicationJob | |
def self.perform_later | |
raise "This job is not designed to be run asynchronously. Please use #perform_now" | |
end | |
end |
View Ruby.sublime-syntax
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
%YAML 1.2 | |
--- | |
name: Ruby (Custom) | |
# TODO: unresolved issues | |
# | |
# text: | |
# "p << end | |
# print me! | |
# end" | |
# symptoms: |
NewerOlder