Where to put additional code for model.


I have written a method to map three ‘virtual’ fields in my form to one

‘proper’ field in my model.

It looks like this:

class Class

def map_three_fields(var1, var2, var3)

string_val = "...do stuff..."

self.class_eval string_val



At the moment it is sitting at the top of my model, but the method is

quite long and this looks a bit ugly / cluttered.

You could put it down the end of the model, it should be in the private section anyway, presumably.
If it is that ugly/cluttered you could refactor it.