Re: Modules in rails? ( controllers or models?)
- From: thefed <fedzor@xxxxxxxxx>
- Date: Sun, 2 Dec 2007 18:49:19 -0500
On Dec 2, 2007, at 6:40 PM, malugu satyajit wrote:
Hello,
I have an rails application that has almost similar function for three
classes. So I am thinking to create a parent class and then the sub
classes
inherit from it. But rails already inherits from ActiveRecord
(models) or
ApplicationController(controller).
So how can I inherit from others classes. My my ruby knowledge it
is modules
and then you mixin the module in your class.
Now my question, where you write the module in rails is it in
controller or
model? Can some one provide me links or guidance.
You can create a parent class that inherits from ActiveRecord or
ApplicationController.
Then, your subclasses can inherit from the parent class.
This may or may not work, and this is a question for the rails list
_______________________________|
- Ari
I just bought another case of RockStar. Expect architectural changes.
.
- Follow-Ups:
- Re: Modules in rails? ( controllers or models?)
- From: malugu satyajit
- Re: Modules in rails? ( controllers or models?)
- References:
- Modules in rails? ( controllers or models?)
- From: malugu satyajit
- Modules in rails? ( controllers or models?)
- Prev by Date: Modules in rails? ( controllers or models?)
- Next by Date: Re: WIN32OLE - problem with argv
- Previous by thread: Modules in rails? ( controllers or models?)
- Next by thread: Re: Modules in rails? ( controllers or models?)
- Index(es):
Relevant Pages
|