The problem seems to be specific to paginating_find calls:

TypeError (can't dup NilClass):
   vendor/plugins/community_engine/plugins/paginating_find/lib/ 
paginating_find.rb:103:in `find'
   vendor/plugins/community_engine/app/controllers/users_controller.rb: 
90:in `show'
   haml (2.2.2) lib/sass/plugin/rails.rb:19:in `process'

here's the offending line farther up the trace:
     @recent_looks   = @user.looks.find(:all, :limit =>  
8, :order=>"created_at DESC")

'Look' is subclassed from Photo which I've made polymorphic.  i think  
thats part of the prblem.  Replacing with a more verbose find resolves  
the issue for this instance:
     @recent_looks   =  
Look.find(:all, :conditions=>{:user_id=>@user}, :limit =>  
8, :order=>"created_at DESC")

Maybe there is something wrong paginating_find.rb (line 103) in the  
context of the polymorph?:
         find_without_pagination(*(args << options))

On Jul 29, 2009, at 1:18 AM, Jim Ruther Nill wrote:

> Why work on the plugin when you can override everything in your app  
> directory?
>
> To override the plugin controller, just copy the action you want to  
> a controller file to your app directory and modify it.  This action  
> will be loaded first before the ones in your plugin.
>
> To override a model, add the following lines on top of your model file
>   for example, inside app/models/user.rb
>     require_dependency "#{RAILS_ROOT}/vendor/plugins/ 
> community_engine/app/models/user.rb"
>     class User < ActiveRecord::Base
>       # do your thing
>     end
>
>
>
> On Wed, Jul 29, 2009 at 3:55 AM, Christopher Becker <[email protected] 
> > wrote:
> I wish there was a better way to extend the CE plugin classes.  I  
> feel really awful about abandoning the plugin architecture and  
> modifying files in /vendor.  What happens when the next release of  
> CE comes out and I want to take advantage of cool new features?  A  
> huge diff and merge every time??  It goes against the very fiber of  
> my being.
>
>
>
> On Jul 28, 2009, at 5:53 PM, Jim Ruther Nill wrote:
>
>> try ActiveSupport::Dependencies, not just Dependencies.
>>
>> On Tue, Jul 28, 2009 at 6:48 PM, Christopher Becker <[email protected] 
>> > wrote:
>>
>> I'm the same position.  I found a bunch of "solutions" to the  
>> nilClass
>> issue caused by overriding the plugin classes but none of them work
>> for me (running rails 2.3.2).  If i fix it in production, it breaks  
>> in
>> dev, and vice-versa.
>>
>> On Jul 28, 2009, at 3:46 PM, thestig wrote:
>>
>> >
>> > per the advice of this page:
>> > http://sites.google.com/a/curbly.com/communityengine/customizing-ce-1/developing
>> >
>> > config.after_initialize do
>> >  Dependencies.load_once_paths =  
>> Dependencies.load_once_paths.select {|
>> > path| (path =~ /(community_engine)/).nil? }
>> > end
>> >
>> > but when I start my rails project I get this:
>> >
>> > => Booting Mongrel
>> > => Rails 2.3.2 application starting on http://0.0.0.0:3000
>> > c:/ruby/lib/ruby/gems/1.8/gems/desert-0.5.0/lib/desert/rails/
>> > dependencies.rb:56:
>> > in `look_for_constant_in_parent_module': Constant  
>> Rails::Dependencies
>> > from rails
>> > /dependencies.rb not found (NameError)
>> > Constant Dependencies from dependencies.rb not found    from c:/ 
>> ruby/
>> > lib/ruby/ge
>> > ms/1.8/gems/desert-0.5.0/lib/desert/rails/dependencies.rb:13:in
>> > `load_missing_co
>> > nstant'
>> >        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
>> > active_suppo
>> > rt/dependencies.rb:80:in `const_missing'
>> >        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
>> > active_suppo
>> > rt/dependencies.rb:98:in `send'
>> >        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
>> > active_suppo
>> > rt/dependencies.rb:98:in `const_missing'
>> >        from D:/vdb/igl/config/environments/development.rb:22:in
>> > `load_environme
>> > nt'
>> >        from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/
>> > initializer.rb:592:i
>> > n `call'
>> >        from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/
>> > initializer.rb:592:i
>> > n `after_initialize'
>> >        from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/
>> > initializer.rb:591:i
>> > n `each'
>> >         ... 10 levels...
>> >        from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/ 
>> commands/
>> > server.rb:8
>> > 4
>> >        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/ 
>> custom_require.rb:
>> > 31:in `ge
>> > m_original_require'
>> >        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/ 
>> custom_require.rb:
>> > 31:in `re
>> > quire'
>> >        from script/server:3
>> > >
>>
>>
>>
>>
>>
>>
>> -- 
>> "We do not believe in ourselves until someone reveals that deep  
>> inside us is valuable, worth listening to, worthy of our trust,  
>> sacred to our touch." - E. E. Cummings
>>
>>
>>
>
>
>
>
>
>
> -- 
> "We do not believe in ourselves until someone reveals that deep  
> inside us is valuable, worth listening to, worthy of our trust,  
> sacred to our touch." - E. E. Cummings
>
> >


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