Skip to content

Instantly share code, notes, and snippets.

@oneup
Created July 18, 2009 05:34
Show Gist options
  • Save oneup/149429 to your computer and use it in GitHub Desktop.
Save oneup/149429 to your computer and use it in GitHub Desktop.
useful rails cheatsheet
# Rails Cheat Sheet
# and list of helpers worth keeping
# command line
script/generate controller
# route
map.root :controller => "controller_name"
# *.html.erb
<%= yield %>
<%= stylesheet_link_tag "application" %>
<%= render :partial => "sidebar" %>
# rails form helpers
<% form_tag :action => :do do -%>
<%= text_field_tag :line %>
<%= submit_tag 'Do' %>
<% end -%>
# rails links (so-la-la. need better search / querying)
http://www.rubyonrails.org/ : Ruby on Rails
http://www.ruby-lang.org/ : Ruby Language
http://guides.rubyonrails.org/ : Rails Guides
# feature splicing
# endless scrolling from old soup.io source
# on-demand image resizing / basic multi-blogentry model from soup.io aswell
# subdomains (portier / kiwibukket)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment