Hi All, I''m after some best practice/general advice. I have two main tables (jobs and offices) in the database, both of which reference another lookup table (job_types and office_types respectively). jobs - office_id (fk to offices table) - job_types_id (fk to job_types -lookup- table) offices - office_type_id (fk to office_types -lookup- table) - contract (bool) Both lookup tables are just comprised of id and description. I have models to reflect each of these four tables, with the necessary AR relationships in place. I''ve just added a method to Job that decides who is to pay for the work for a given job. The logic to decide who pays has to check any combination of job_type, office_type and contract, where there are (currently) 10 job types and 5 office types. The current logic is very procedural, e.g. if a and b and c then ... elsif a and c and d then ... etc etc. I''m thinking there must be a way for me to refactor this out, giving the other classes more responsibilty. I''m just really not sure how? The other question I have is related to the use of the lookup tables in the db. The data is unlikely to change very often and so I''m thinking of putting it in a constant hash. This would mean that I don''t have to retrieve data from the db each time I need to compare data to data in the lookup tables; but it means I lose the referential integrity supplied by having the data in the db (unless I have it in both places, ensuring that there is only one master data store - dry). As an example, to check the office type at the moment I''m doing something like.. %w[ officetype1 officetype2 officetype3 ].include?job.office.office_type.description Any thoughts on either of these two points would be greatly appreciated. Chris