difference in writing a class file in lib and models folder

Hi
    I would like to know the difference between writing our own class
file(or module) in lib folder and models folder (Or any other folder).
Actually what is the use of this lib folder in rails..Cant I write the
same in models folder (not inheriting from ActiveRecord class)

Thanks in advance
Sijo

You could but if it's not a model, why put it in a folder labelled models?
It's purely for code organisation, and Rails uses the folder names for
some of it's auto load magic.

I use a library called simple_form which creates a non-ActiveRecord
model for contact forms but it behaves like a model as far as Rails is
concerned so I will put that class in the models folder.

Andrew Timberlake
http://ramblingsonrails.com
http://www.linkedin.com/in/andrewtimberlake

"I have never let my schooling interfere with my education" - Mark Twain

Lib is mostly for your own classes that don't change much. Hence, in
dev mode Theyre not reloaded. Models are. Models can be any classes,
inheriting from anywhere. They're or your business objects

Blog: http://random8.zenunit.com/
Learn rails: http://sensei.zenunit.com/

I disagree, a quick test in 2.2.2 shows classes in lib reloading in dev mode

Andrew Timberlake
http://ramblingsonrails.com
http://www.linkedin.com/in/andrewtimberlake

"I have never let my schooling interfere with my education" - Mark Twain

yes classes in lib reloading in dev mode