Gedit Cheat Sheet For Rails Development
Gedit Cheat Sheet For Rails Development
Ruby RHTML
Tab Trigger Tab Trigger
class class_name class block <% %> %
def method_name def block result =
each do |element| each hash pair :
(:key => 'value')
for element forin hash pointer ( => ) l
in collection
if condition if,ife <% if condition if, ife
unless condition unless <% @list.each do |item| each
case object case <%= link_to lta[i],
ltc[a,ai]
hash pair : <%= image_tag img
(:key => 'value')
hash pointer ( => ) l <% form_tag form
params[:id] params <%= label label
session[:user] session <%= text_field textf
flash[:notice] flash <%= password_field passf
redirect_to rea[i], <%= text_area textarea
rec[a,ai]
render :action ra <%= submit_tag submit
render :layout rl <%= image_submit_tag imgsubmit
render :partial rp[c,l,o] <% end %> end
render :text rt <%= error_messages_for emf
belongs_to bt <%= render :partial rpc
:collection
has_many hm <div class divc
validates_length_of vl <div id divi
validates_presence_of vp <table> table
assert_equal ae <th> th
<tr> tr
<td> td
<br/> br
<ul> ul
<li> li
tag <