100% found this document useful (6 votes)
3K views1 page

Gedit Cheat Sheet For Rails Development

This document provides a cheat sheet for using Gedit for Rails development. It lists Ruby on Rails shortcuts and code snippets along with their corresponding tab triggers in Gedit. Some examples include class mappings to "class", if/else conditional mappings to "if,ife", and form helpers like label and text_field mapped to "label" and "textf". Render actions, associations, and validations are also included.

Uploaded by

ltabreu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (6 votes)
3K views1 page

Gedit Cheat Sheet For Rails Development

This document provides a cheat sheet for using Gedit for Rails development. It lists Ruby on Rails shortcuts and code snippets along with their corresponding tab triggers in Gedit. Some examples include class mappings to "class", if/else conditional mappings to "if,ife", and form helpers like label and text_field mapped to "label" and "textf". Render actions, associations, and validations are also included.

Uploaded by

ltabreu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

My 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 <

You might also like