Skip to content

Instantly share code, notes, and snippets.

@jraines
jraines / rails31init.md
Created May 24, 2011 17:03
Rails 3.1 with Rspec, Cucumber, Factory Girl, Haml, and Simple Form

Install Rails 3.1 RC

gem install rails --pre

generate new app, skipping Test::Unit file generation

rails new my_app -T

Set up Gemfile

@marvin
marvin / gist:977346
Created May 17, 2011 20:42
integrate image to rails link_to - requires jquery-ui. the code creates 3 icons for show,edit and destroy
<%= link_to content_tag(:span, '', :class => "ui-icon ui-icon-folder-open"), yourname, :title => "Show", :class => "ui-state-default ui-corner-all", :id => "no-border" %>
<%= link_to content_tag(:span, '', :class => "ui-icon ui-icon-gear"), edit_yourname_path(yourname), :title => "Edit", :class => "ui-state-default ui-corner-all", :id => "no-border" %>
<%= link_to content_tag(:span, '', :class => "ui-icon ui-icon-trash"), yourname, :confirm => "Are you sure you?", :title => "Delete", :method => :delete, :class => "ui-state-default ui-corner-all", :id => "no-border" %>