Self referential many to may relationsSection: Ruby on Rails Snippet
flash message without redirectSection: Ruby on Rails Snippet
flash.now[:notice] = 'some message'
How to check if a file exists in Ruby on RailsSection: Ruby on Rails Snippet
This is how you check in RoR if a file exists:
FileTest.exists?("<path_to_file>")
Sections 
- PHP (1)
- General (2)
- Ruby on Rails Snippet (3)
- Ruby on Rails (13)
- HTML (1)
- Css (1)
- regex (1)
- Photoshop (1)
- Leopard (1)
A little note to Internet Explorer users:
This site is not made for Internet Explorer. Some pages may look like shit. Yes, i could fix it for IE, but no, I'm not gonna do it. Try Opera or Firefox instead!