Re: Attributes in classes db/migrate or app/models

Hassan Schroeder
2012-07-21T13:29:34Z

On Sat, Jul 21, 2012 at 3:54 AM, Cortomix aa
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:

> One of the things that has surprised to me, after I''ve read some
books,
> it''s that classes hasn''t got attributes; the attributes
are in the files
> db/migrate/*. After that, the ORM makes the mapping with de Database.
> But the attributes aren''t in the files app/models/*.

Not all classes in a Rails app inherit from ActiveRecord::Base :-)
And you can have attributes that come from mixed-in modules. It''s
not all about an ORM mapping.

> It''s difficult to me see the class without attributes; in Java is
> different. Is there anything bad in this idea?

Sorry, I''m not sure what you''re asking.

--
Hassan Schroeder ------------------------
hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
http://about.me/hassanschroeder
twitter: @hassan