3 ms·
All of the code samples in the "models" that I've seen seem to be straight to database type code I think the problem is that you're looking at "code samples",
by kscaldef 16y ago
All of the code samples in the "models" that I've seen seem to be straight to database type code
I think the problem is that you're looking at "code samples", which tend to be the simplest possible examples. One of the nice things about RoR is that a model class can be as short as two lines:
class MyModel < ActiveRecord::Base
end
and everything else happens by "magic". Our system has a few classes like that. OTOH, we also have model classes with thousands of lines of complicated business logic. But, showing those to someone trying to learn RoR would just overwhelm them.