/app/lib/decorates/%MODEL_NAME%/*.rb
/app/lib/forms/%PLURALIZED_MODEL_NAME%/**/*.rb
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
require 'bundler' | |
GEMFILE_LOCK_PATH = 'Gemfile.lock'.freeze | |
lockfile_text = File.read(GEMFILE_LOCK_PATH) | |
lockfile = Bundler::LockfileParser.new(lockfile_text) | |
explicit_gems = lockfile.dependencies.values | |
implicit_gems = lockfile.specs.reduce([]) { |gems, spec| gems += spec.dependencies }.uniq(&:name) | |
all_gems = (explicit_gems + implicit_gems).uniq(&:name).sort_by(&: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
# Using these pry gems | |
# gem "pry" | |
# gem "pry-rails" | |
# gem "pry-byebug" | |
# gem "pry-stack_explorer" | |
# gem "pry-doc" | |
# gem "pry-state" | |
# gem "pry-toys" | |
# gem "pry-rescue" |
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
# ~/workspace/autoload-example ls -l | |
# total 24 | |
# -rw-r--r-- 1 andrew.lee 588821037 86 Nov 18 22:42 mod.rb | |
# -rw-r--r-- 1 andrew.lee 588821037 94 Nov 18 22:47 not-working.rb | |
# -rw-r--r-- 1 andrew.lee 588821037 76 Nov 18 22:45 works.rb | |
# mod.rb | |
module Mod | |
class Foo | |
def self.call |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/leea/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
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
# The column object we get from AR has a default value that's String | |
# [4] pry(#<AnnotateRb::ModelAnnotator::ColumnAnnotation::AttributesBuilder>)> rcol = @column.instance_variable_get("@column") | |
# => #<ActiveRecord::ConnectionAdapters::PostgreSQL::Column:0x000000010e19ea60 | |
# @collation=nil, | |
# @comment=nil, | |
# @default="0", | |
# @default_function=nil, | |
# @generated="", | |
# @name="duration_minutes", | |
# @null=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
file = <<~FILE | |
# typed: strong | |
# == Schema Information | |
# | |
# Table name: users | |
# | |
# id :bigint not null, primary key | |
# | |
module Admin |