search for: dryest

Displaying 3 results from an estimated 3 matches for "dryest".

2006 Jun 12
6
Storing "money" in databases
...ealing with money values stored in databases. I like the idea of storing all the values as integers, i.e. all the values in eurocents not euros. Then I need to multiply all values the users enter by 100 before storing them in the database. Now the question is, what''s the most efficient and dryest way to do this? I''m not sure if I want to override every accessor activerecord generates for me ... Any ideas? cheers Martin
2006 Jul 01
8
Seeking Advice on Pattern for Multi-Organization Application
...ion? As I see it, everything that is in the database will need also to belong to a school, and when someone logs in they will only see the data relevant to their school (unless they are education authority managers who will have their own interface). Any advice on how to implement this in the DRYest, most Rails-esque way will be most gratefully received :) Robert Jones -- Posted via http://www.ruby-forum.com/.
2006 Jan 25
12
DRY in Models
I am building an app right now that needs to grant access to three levels of members right now - each will have their own table in the DB. When creating the add_user action I am converting the password into a hashed password through the model. The way I am doing this right now, I will inevitably end up with repeated code in three different models. Is there a way I can define this code in