you can add your own controllers and models as you would do in a
normal rails project (RAILS_ROOT/app/controller or model)
if you want rewrite existing CE controllers or models just copy them
into RAILS_ROOT/app an rewrite. CAUTION: you should know what you do
else you could loose CE.
another way is to extend existing controllers and models by inherit
them and extend your way.
Bruno wrote documentation (http://www.communityengine.org/
documentation.html) for this:
<Bruno says>
Overriding CE Models
The Engines plugin automatically overrides CE's views with your own,
and does a nice job of mixing your controllers with CE's (your code
takes precedence). Unfortunately it doesn't do much in terms of mixing
model code from your application and CE.

To begin with, note that you can include a model in your app
directory, and if it has the same name as a CE model, your code will
take precedence. For example, you can completely replace the User.rb
from CE with your own. The problem with this is that you'll lose all
the methods from CE, and you'll have to duplicate them in your model
for anything to work.

There are several of other ways to mix in your code into CE's models.
Taking User.rb as an example, you could:
Subclass the model, creating something like MyUser.rb in your models
directory.
Mix your code into User.rb, by writing a plugin or initializer that
adds your methods to the User.rb model dynamically (meta-programming)
Other ways? (Suggestions welcome)
If you use the first method, you should check out the Rails
documentation for the 'becomes' method, which lets your switch objects
back and forth between classes. This is useful for taking the
current_user object (which is a User), and turning it into a MyUser
object.
</Bruno says>

So leave your fingers from vendor/plugin if you don't want to loose
upgrade ability of upcoming CE realeases

On 27 Sep., 06:06, adf <[EMAIL PROTECTED]> wrote:
> hi, i have successfully installed on my windows, working fine, thanks
> for such a great job. am trying to understand the flow,
>
> but didn't get one how can i add more controllers or more models to
> this community engine, for this am using normal ruby script/generate
> then controller/models creating in main app folder, but not in vendor/
> plugin folder
>
> if i wanna generate in vendor/plugin, then how can go?
>
> Thank you SBabuM
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CommunityEngine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/communityengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to