Show Menu
Cheatography

1st Mar 2023 part 2 Cheat Sheet (DRAFT) by

Working progresssssssssssssssssss

This is a draft cheat sheet. It is a work in progress and is not finished yet.

lib/ac­tio­n_v­iew­/he­lpe­rs/­dat­e_h­elp­er.rb

def datetime_select
   bindin­g.pry
Then $ rails s (restart server)
f.datetime_select
<select>
fstarts_at
def time_select
   bindin­g.pry
f.time_select
<input> X 3
<select> X 2
fstarts_at

lib/ac­tio­n_v­iew­/he­lpe­rs/­for­m_o­pti­ons­_he­lper.rb

d collection_select
  binding.pry
Then $ rails s (restart server)
f.collection_select
<select>
d select
  binding.pry
f.select
<select>
fassig­nee_id, fhow_h­eard, fstatus, ftrans­act­ion­_type
d time_zone_select
  binding.pry
f.time_zone_select
<select>
<option> X N
ftime_zone

action­tex­t/a­pp/­hel­per­s/a­cti­on_­tex­t/t­ag_­hel­per.rb

def rich_text_area_tag
   bindin­g.pry
Then $ rails s (restart server)
f.rich_text_area_tag
fcontent

turbo-­rai­ls/­app­/he­lpe­rs/­tur­bo/­fra­mes­_he­lper.rb

def turbo_frame_tag
   bindin­g.pry
Then $ rails s (restart server)
f.turbo_frame_tag
<turbo-frame>
 

Snippets

routes.rb
r
 
xxxxx_­con­tro­ller.rb
controller
class Plural­Con­troller
ci or cindex
def index
cs or cshow
def show
cn or cnew
def new
cc or ccreate
def create
ce or cedit
def edit
cu or cupdate
def update
cd or cdestroy
def destroy
 
cni or cnindex
def index (nested)
cns or cnshow
def show (nested)
cnn or cnnew
def new (nested)
cnc or cncreate
def create (nested)
cne or cnedit
def edit (nested)
cnu or cnupdate
def update (nested)
cnd or cdestroy
def destroy (nested)