Rails without models

hi all,
i’m writing an app which doesn’t use an sql database, but an openldap
one. i’m not using activeldap, so can’t go with that approach (found it
too resource intensive).

once a user is logged in via the login/authenticate controller/action,

they’re redirected to main/welcome - basically the ldap connection
object is left behined and i need a way to access it from main
controller.

i have my login mechanism in the application controller, and would like

to have some models. are there any docs for using rails in this way?

There is nothing stating that you have to use ActiveRecord classes for your models. You should be able to stick any Ruby class in the app/models directory of your application and access it from your controllers.

cheers.


Posted via http://www.ruby-forum.com/
.

HTH,
Michael Guterl

You can also use ActiveRecord without a database. I took some code from technoweenie (Rick Olson) and built a tutorial that shows how to build an email form for your site. Following this approach, you could have models that have validations but don’t have tables :slight_smile:

http://www.bphogan.com/learn/pdf/tableless_contact_form.pdf