The call to can_create needs to be passed the collection  
(@project.stories, in this case)
rather than the default of "this" (the project). I've pushed a fix to  
github.
(one line in pages.dryml.erb).

--Matt

On Sep 4, 2008, at 2:00 PM, kevinpfromnm wrote:

>
> The :stories in the beginning changes the context.  But the & might be
> dropping the context.  I haven't looked deeper into the methods so
> can't comment about whether can_create? can be explicitly called from
> 'this' or use 'this' as a parameter to it.
>
> On Sep 4, 11:40 am, stissing <[EMAIL PROTECTED]> wrote:
>> Hi there. I just downloaded 0.8. I'm extremely impressed with it.  
>> Nice
>> work.
>>
>> I started doing the agility-tutorial until a small problem occurred.
>> It seems that when the generated show-page for Project "decides"
>> whether or not to render a "New Story" link, the object passed to
>> can_create? is the project instead of the new story.
>>
>> pages.dryml - not working:
>>
>>   <a:stories action="new" if="&can_create?" param="new-link">New
>> Story</a>
>>
>> pages.dryml - working (for me at least):
>>
>>   <a:stories action="new" param="new-link">New Story</a>
>>
>> I'm not fluent in DRYML yet, so i'm not completely sure how the
>> <a:stories ... is supposed to change the context. Has anyone
>> experienced something similar to this?
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to