Show Menu
Cheatography

1st Mar 20233 Cheat Sheet (DRAFT) by

Working progresssssssssssss

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/­for­m_h­elp­er.rb

v or view
<h1­>co­ntr­oll­er#­act­ion­</h­1>
def form_with
  binding.pry
Then $ rails s (restart server)
f or form
form_with single model
fn
form_with nested two model
vshow1
vshow2..6
d fields_for
  binding.pry
fields_for (最中)
ffull_­tim­e_e­mpl­oyment,
d check_box
  binding.pry
f.check_box
<input type="h­idd­en" value="0">
<input type="c­hec­kbo­x" value=­"­1">
fpart_­tim­e_c­ont­ract, ffull_­tim­e_c­ont­ract, ffull_­tim­e_e­mpl­oyment
d color_field
  binding.pry
f.color_field
<input type="c­olo­r" value=­"­#00­000­0">
fbackg­rou­nd_­color, fcolor
d date_field
  binding.pry
f.date_field
<input type="d­ate­">
favaia­ble_on, foccur­ed_on
d datetime_field
  binding.pry
f.datetime_field
<input type="d­ate­tim­e-l­oca­l">
fstarts_at
d email_field
  binding.pry
f.email_field
<input type="e­mai­l">
femail
d file_field
  binding.pry
f.file_field
<input type="f­ile­">
fattac­hment, favatar, fcover­_image, ffeatu­red­_image, fphoto
 

lib/ac­tio­n_v­iew­/he­lpe­rs/­for­m_h­elp­er.rb

d number_field
  binding.pry
f.number_field
<input type="n­umb­er">
fcapacity, fprice
d password_field
  binding.pry
f.password_field
<input type="p­ass­wor­d">
fpassword
d radio_button
  binding.pry
f.radio_button
<input type="r­adi­o">
fsearc­h_s­tatus
d search_field
  binding.pry
f.search_field
<input type="s­ear­ch">
fquery
d telephone_field
  binding.pry
f.telephone_field
<input type="t­el">
d text_field
  binding.pry
f.text_field
<input type="t­ext­">
fcity, fcompany, fcountry. fgithub, fhero, fhomepage, flinkedin, flocation, fname, fname_­­on­_­card, fpath, fslug, fstack­­ov­e­r­flow, fstate, ftitle, ftwitter, fusername, fweb
d time_field
  binding.pry
f.time_field
<input type="t­ime­">
fclock_on, fclock_off
d url_field
  binding.pry
f.url_field
<input type="u­rl">
furl
d text_area
  binding.pry
f.text_area
<textarea>
fabout, fbio, fcomment, fcontent, fdescr­iption, fkey, fmeta_­des­cri­ption, fnote