Cheatography
https://cheatography.com
Working progresssssssssssssssssss
This is a draft cheat sheet. It is a work in progress and is not finished yet.
lib/action_view/helpers/date_helper.rb
def datetime_select binding.pry |
Then $ rails s (restart server) |
f.datetime_select <select> |
fstarts_at |
def time_select binding.pry |
f.time_select <input> X 3 <select> X 2 |
fstarts_at |
lib/action_view/helpers/form_options_helper.rb
d collection_select binding.pry |
Then $ rails s (restart server) |
f.collection_select <select> |
d select binding.pry |
f.select <select> |
fassignee_id, fhow_heard, fstatus, ftransaction_type |
d time_zone_select binding.pry |
f.time_zone_select <select> <option> X N |
ftime_zone |
actiontext/app/helpers/action_text/tag_helper.rb
def rich_text_area_tag binding.pry |
Then $ rails s (restart server) |
f.rich_text_area_tag
|
fcontent |
turbo-rails/app/helpers/turbo/frames_helper.rb
def turbo_frame_tag binding.pry |
Then $ rails s (restart server) |
f.turbo_frame_tag <turbo-frame> |
|
|
Snippets
routes.rb |
r |
|
xxxxx_controller.rb |
controller |
class PluralController |
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) |
|