Jacques, Your suggestion gets me half way there ;). But if you can believe it, it revealed another bug!!! When I used your code, the array I pass as relay_sessions comes through to the partial as a single element of the array (not sure if its the first element, I haven't debugged that part yet). WOW!!! I think I'm just going to put all my partials in shared until this serious bug gets fixed. I've got a website to re-launch. I must get something published before New Year ;)
thanks, Jon On Dec 23, 10:25 pm, Jacques Crocker <[email protected]> wrote: > I've run into this as well. I believe the problem is with the > parameter you are sending it. It sees a collection, and it tries to be > smart by finding the partial path for you, even though you specified > it. > > Here's my workaround: > > Before: > <%= partial 'relay_sessions/session_history', :relay_sessions => > @relay_sessions %> > > After: > <%= partial 'relay_sessions/session_history', :with => > @relay_sessions, :as => :relay_sessions %> > > Let me know if this fixes your issue. I think you should log a bug on > it though. I had it on my list of things to log, but lost track of it. > > On Dec 23, 6:18 am, Jon Hancock <[email protected]> wrote: > > > update...just to be sure, I moved all the partials to the shared > > directory and everything works. > > Is this a known design limitation or just a bug? > > I'll add it to lighthouse. > > thanks, Jon > > > On Dec 23, 10:04 pm, Jon Hancock <[email protected]> wrote: > > > > I have a partial: > > > > <%= partial 'shared/pagination', :pager => @pager, :page => @page %> > > > > no problem, it finds my shared partial in app/views/shared/ > > > _pagination.html.erb > > > > I have another partial: > > > > <%= partial 'relay_sessions/session_history', :relay_sessions => > > > @relay_sessions %> > > > > I get an error: > > > Could not find template at /Users/jhancock/src/ssmerb/app/views/ > > > account/_relay_sessions.html.* > > > > It gets the path wrong. If I hard code the path, the error shows the > > > correct path and still tells me it can't find the file. > > > The partial is very clearly in the correct place and in fact I'm using > > > it successfully when the partial is referenced from the same > > > controller, which is why its a partial as I'm re-using it ;-). > > > > So why is my shared directory working correctly but not the other? > > > > very strange..any debugging tips? > > > > thanks, Jon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" 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/merb?hl=en -~----------~----~----~----~------~----~------~--~---
