Welcome To Snipplr


Everyone's Recent Rails Snippets Tagged ruby



1 2 Next »
I normally paste this into config/mongrel.rb, then add "require 'mongrel'" in my config/deploy.rb Once that's done, you'll be able to start, stop, and restart your mongrels like so: `cap deploy:mongrel:start/stop/restart`
3 580 posted 15 years ago by jimmyebaker
Send file from different name
1 658 posted 15 years ago by tonic
1 655 posted 15 years ago by mikegreen
"The new naming scheme for template (eg. .html.erb) does not seem to work for partials. When using :partial => 'form' a filename "_form.html.erb" is not recognized. " Rails now requires the partial to be referenced by dotted format
1 612 posted 16 years ago by cczona
Use this to upload and resize your images using RMagick. Code by nixnewbie.
2 820 posted 16 years ago by Tricon
A quick and simple way of having any flash messages, from railscast #18
1 523 posted 16 years ago by bordalix
This redirects visitors to a new URL using a 301 redirect. Using a 301 redirect is the safest way to let search engines like Google, Yahoo!, Live and Ask know your address has changed.
3 1594 posted 17 years ago by jonhenshaw
1 2 Next »