# Classmodel - example

**URL:** <https://www.ruby-forum.com/t/classmodel-example/81477>\
**Category:** Rails\
**Created:** [January 9, 2007, 8:28am UTC](https://www.ruby-forum.com/t/classmodel-example/81477 "2007-01-09T08:28:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![flnative](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/5daacb/32.png) [@flnative](https://www.ruby-forum.com/u/flnative)\
**Post date:** [January 9, 2007, 8:28am UTC](https://www.ruby-forum.com/t/classmodel-example/81477/1 "2007-01-09T08:28:37Z")

</div>

Hi everyone

Does anybody has an example of a rails classmodel? I learn rails now and  
I’m wondering, how does a classmodel of rails look like!

Thanks for your suggestions…

---

<div class="post-metadata">

**Author:** ![flnative](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/5daacb/32.png) [@flnative](https://www.ruby-forum.com/u/flnative)\
**Post date:** [January 9, 2007, 12:31pm UTC](https://www.ruby-forum.com/t/classmodel-example/81477/2 "2007-01-09T12:31:15Z")

</div>

You mean an active record model class?

There are literally hundreds of examples from tutorials all over the  
web. You will need to have a basic grasp of Object Oriented  
programming concepts like classes, encapsulation, etc.

Have a look here:

[http://api.rubyonrails.org/files/vendor/rails/activerecord/README.html](http://api.rubyonrails.org/files/vendor/rails/activerecord/README.html)

It gives enough example of models to get you started.

(Hint: It is the part that starts “class Product \< ActiveRecord::Base”)

-christos

---

<div class="post-metadata">

**Author:** ![flnative](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/5daacb/32.png) [@flnative](https://www.ruby-forum.com/u/flnative)\
**Post date:** [January 9, 2007, 9:19pm UTC](https://www.ruby-forum.com/t/classmodel-example/81477/3 "2007-01-09T21:19:55Z")

</div>

Christos Z. wrote:

> You mean an active record model class?
> 
> There are literally hundreds of examples from tutorials all over the  
> web. You will need to have a basic grasp of Object Oriented  
> programming concepts like classes, encapsulation, etc.
> 
> Have a look here:
> 
> [http://api.rubyonrails.org/files/vendor/rails/activerecord/README.html](http://api.rubyonrails.org/files/vendor/rails/activerecord/README.html)
> 
> It gives enough example of models to get you started.
> 
> (Hint: It is the part that starts “class Product \< ActiveRecord::Base”)
> 
> -christos

No, I don’t mean the topic “active record model class”. I’ve some  
different model classes in my rails-project. Now, I would like to draw a  
picture of my design - it’s calling design model. These design model is  
a image, that explain, how the different classes are arranged in the  
model and which relationships they have to the other model classes. Draw  
a design model is a step in the software engineering process.

---

<div class="post-metadata">

**Author:** ![flnative](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/5daacb/32.png) [@flnative](https://www.ruby-forum.com/u/flnative)\
**Post date:** [January 10, 2007, 4:49pm UTC](https://www.ruby-forum.com/t/classmodel-example/81477/4 "2007-01-10T16:49:20Z")

</div>

That is incredibly cool. It also saves me the trouble of teaching SQL  
Fairy about Rails conventions =)

---

<div class="post-metadata">

**Author:** ![flnative](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/5daacb/32.png) [@flnative](https://www.ruby-forum.com/u/flnative)\
**Post date:** [January 9, 2007, 11:18pm UTC](https://www.ruby-forum.com/t/classmodel-example/81477/5 "2007-01-09T23:18:58Z")

</div>

M. R. :

> No, I don’t mean the topic “active record model class”. I’ve some  
> different model classes in my rails-project. Now, I would like to draw a  
> picture of my design - it’s calling design model. These design model is  
> a image, that explain, how the different classes are arranged in the  
> model and which relationships they have to the other model classes. Draw  
> a design model is a step in the software engineering process.

Visualize Models  
[http://visualizemodels.rubyforge.org/](http://visualizemodels.rubyforge.org/)

```
-- Jean-FranÃ§ois.

```

–  
Ã€ la renverse.
