Skip to content

Instantly share code, notes, and snippets.

@1a57danc3
Forked from JeremyOttley/cheatsheet.rb
Created August 31, 2018 15:21
Show Gist options
  • Save 1a57danc3/70ae35590dd33e82cf34e9893c30addf to your computer and use it in GitHub Desktop.
Save 1a57danc3/70ae35590dd33e82cf34e9893c30addf to your computer and use it in GitHub Desktop.
Rails CheatSheet
#!/usr/bin/env ruby
#CHEATSHEET_DIR = ".cheatsheets"
cheatsheet = File.open("#{CHEATSHEET_DIR}/rails_cheatsheet.txt", "r")
reader = ->line { puts line }
cheatsheet.each_line &reader
#IO.foreach("#{CHEATSHEET_DIR}/rails_cheatsheet.txt") &reader
#!/usr/bin/env ruby
##############################################################################
# DIRECTORIES
##############################################################################
app/ # Core application (app) code, including models, views, controllers, and helpers.
app/assets # Applications assets such as cascading style sheets (CSS), JavaScript files, and images.
bin/ # Binary executable files.
config/ # Application configuration.
db/ # Database files.
doc/ # Documentation for the application.
lib/ # Library modules.
lib/assets # Library assets such as cascading style sheets (CSS), JavaScript files, and images.
log/ # Application log files.
public/ # Data accessible to the public (e.g. via web browsers), such as error pages.
bin/rails # A program for generating code, opening console sessions, or starting a local server.
test/ # Application tests.
tmp/ # Temporary files.
vendor/ # Third-party code such as plugins and gems.
vendor/assets # Third-party assets such as cascading style sheets (CSS), JavaScript files, and images.
config.ru # A configuration file for Rack middleware.
##############################################################################
# VARIABLES
##############################################################################
##############################################################################
# FILE COMMANDS
##############################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment