> > I didn't get to the bottom of this, so I had to override the template > with my own and stop calling page_count. >
That's too bad; I'm guessing there's something special going on in your install to make this error appear (since I can't reproduce it and all my tests pass). > But your mention of trying the tests, Bruno, brought up an interesting > point. I can't in fact pass a lot of the tests anymore, because it > seems that when I run them, it will not just use the CE rails app > embedded inside my app, it will use the WHOLE APP, and so all my > changes to your behavior will break tests. I didn't try going down > into the CE directory and running the rake task from there, maybe that > would work. I guess I expected that prefixing the test with > community_engine implied it would execute those tests within a > strictly community_engine context. > This is a good question. When CE tests are run, they are NOT isolated to the CE directory (even if you run them from within CE). That's by design; if you are making changes in your app that break CE's tests, then you should know about it (since, most of the time, breaking CE's tests is a bad thing). Occasionally there are times when you want to change behavior a way that violates CE's tests (for example, if you don't want User to require a valid birthday, or something). Ideally, you'd be able to override CE's user_test.rb in your application, just changing the test that tests for a valid birthday. Unfortunately, overriding tests in this way is not currently possible (as far as I know), so you just need to be aware of which tests are failing and why. Thanks, Bruno > > On Nov 10, 8:31 pm, Bruno Bornsztein <[email protected]> > wrote: > > @activities is set in activities_controller, line #9. (Please note that > this > > action can only be accessed by the current user, so you can't look at > > another user's network activities). > > > > Regarding your error: I can't reproduce it locally, and my tests pass. > > Please check your tests, specifically, make sure that > > activities_controller_test.rb runs without errors before submitting this > as > > a bug. > > > > Thanks, > > Bruno > > > > On Tue, Nov 10, 2009 at 7:00 PM, Jim Ruther Nill <[email protected]> > wrote: > > > > > > > > > how is @activities declared? > > > > > On Wed, Nov 11, 2009 at 6:58 AM, GregL <[email protected]> wrote: > > > > >> I found out that to visit a page with the user's in-network activity > > >> (as opposed to all activity), you can go to > > > > >> network_user_activities_path(@user) > > > > >> but I get an error visiting said page (which comes out to /<username>/ > > >> activities/network): > > > > >> ActionView::TemplateError (undefined method `page_count' for #<Array: > > >> 0x105891ad8>) on line #10 of > vendor/plugins/community_engine/app/views/ > > >> activities/network.html.haml: > > >> 7: %h3=:activity_from_your_network.l > > >> 8: %table{:width => "100%"} > > >> 9: =render :partial => "activities/activity", :collection => > > >> @activities > > >> 10: -if @activities.page_count > 1 > > >> 11: .pagination= paginating_links > > >> @activities, :link_to_current_page => true > > >> 12: -else > > >> 13: =:you_have_no_network_activity_yet.l > > > > >> It looks like it expects the array of activities to be a pagination > > >> object. I'm not familiar with the pagination system, any ideas how to > > >> fix it? > > > > >> -- > > > > >> You received this message because you are subscribed to the Google > Groups > > >> "CommunityEngine" group. > > >> To post to this group, send email to [email protected] > . > > >> For more options, visit this group at > > >>http://groups.google.com/group/communityengine?hl=. > > > > > -- > > > "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]. > > > For more options, visit this group at > > >http://groups.google.com/group/communityengine?hl=. > > -- > > 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]<communityengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/communityengine?hl=. > > > -- 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=.
