Creating a fixture via ActiveRecord





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2 Next »
4
Date Submitted Thu. Oct. 19th, 2006 4:36 PM
Revision 1
Beginner lagsalot
Tags rails
Comments 0 comments
This will render a flash div only if there is a message in flash. Also will set the id to the flash key.

flash[:notice] returns

This is the notice
2
Date Submitted Wed. Aug. 9th, 2006 5:49 AM
Revision 1
Beginner plinge
Tags Ruby | signals | slots
Comments 0 comments
Well, ruby is actually so flexible that there is no real need to implement the goode olde signals & slots metaphor. But it serves nicely as demonstration of ruby properties, so here we go.
1
Date Submitted Wed. Oct. 11th, 2006 3:08 PM
Revision 1
Helper jeremec
Tags activerecord | find | override | rails | Ruby
Comments 0 comments
From time to time you may have reasons to override the default find method that ActiveRecord provides. In this example, we'll store a side-copy of the record attributes so that we have some basis for discovering changes to the data.

note: this will not override dynamic finders such as find_by_id
1
Date Submitted Mon. Jun. 9th, 2008 3:54 AM
Revision 1
Helper jamesmcm
Tags Encryption | Ruby
Comments 0 comments
A quick implementation of an encrypter which can't be cracked by frequency analysis.
1
Date Submitted Mon. Jun. 9th, 2008 3:56 AM
Revision 1
Helper jamesmcm
Tags decryption | Ruby
Comments 0 comments
The decrypter for the simple encrypter I posted earlier - Takes the encrypted text from a text file - "encrypt.txt" which the encrypter automatically writes to.
1
Date Submitted Mon. Jun. 9th, 2008 4:00 AM
Revision 1
Helper jamesmcm
Tags converter | Ruby
Comments 0 comments
A simple algorithm to convert decimal numbers to binary; pointless since most languages have an inbuilt function but was used for learning about algorithm design.
1
Date Submitted Sat. Feb. 18th, 2006 1:46 PM
Revision 3
Beginner seasons
Tags 0 | 1 | Ruby
Comments 2 comments
Directory Utility for Ruby
1
Date Submitted Fri. Jun. 16th, 2006 9:01 AM
Revision 1
Beginner cyu
Tags migration | rails | rake | Ruby
Comments 0 comments
By default, migrations will run on the development environment. Here's how you would specify another environment.
« Previous 1 2 Next »