> i need help understanding this. If i'm reading it correctly, if i want
> to add a has_many to the CE user.rb, i would do something like the
> following in my user.rb file:
>
> require_dependency "#{RAILS_ROOT}/vendor/plugins/community_engine/app/
> models/user.rb"
> class User < ActiveRecord::Base
>
>   has_many :myobject, :through => :user_myobject
>
> end

This is not the strategy I use. Instead, I subclass the User model and make
my additions there (i.e. class Player < User). Removing functionality is a
little tricky; you can remove ActiveRecord validations pretty easily (just
add your own validation callback and remove the errors), but removing other
callbacks might not be so simple.

I'm trying to stay away from modifying the CE code, however, I'm not
> sure it makes a difference whether i change it or override it. for
> example, I've changed the shared/_admin_nav.html.haml partial to add
> some new functionality. I did this by copy/pasting the view into my
> project, then modifying it. This means that when CE has a new release,
> and something is new in that file, I need to merge the diffs into my
> new file. If that's the case, why not just modify the CE view, keeping
> with the DRY idea.
>
That's certainly an option. On the other hand, you may not want to keep in
sync with CE for certain views (application.html.haml comes to mind), so
overriding makes sense in those cases.


>
>

--~--~---------~--~----~------------~-------~--~----~
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