Skip to content

Instantly share code, notes, and snippets.

@hahmed
Created February 27, 2023 22:59
Show Gist options
  • Save hahmed/d0e7155f17cc700dab99e44328f649f8 to your computer and use it in GitHub Desktop.
Save hahmed/d0e7155f17cc700dab99e44328f649f8 to your computer and use it in GitHub Desktop.
set the console to pry
initializer 'myveryfirstinitializer.rb', <<-CODE
Rails.application.configure do
console do
require "pry"
config.console = Pry
require "awesomecompany"
end
end
CODE
gem "pry"
file 'app/models/awesomecompany.rb', <<-CODE
class Awesomecompany
class << self
def readme
binding.pry
puts "readme"
end
def pagerduty
end
def contributing
end
def help
end
end
end
CODE
after_bundle do
git :init
git add: "."
git commit: %Q{ -m 'Initial commit' }
end
@hahmed
Copy link
Author

hahmed commented Feb 27, 2023

rails new example -m template.rb --api
cd example
bin/rails c
> Awesomecompany.readme 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment