I should add that changing the
<form:new update="members, member-count" reset-form refocus-form>
to
<form:new>
to get rid of the Ajax magic and go back to basics produces:
undefined method `memberships' for #<ProjectMembership:0xb5052084>
Extracted source (around line #4):
1: <show-page layout="aside">
2:
3: <aside:>
4: <section:memberships class="memberships">
5: <h2><count label="Project Member" part="member-count"/></h2>
6: <collection part="members">
7: <card:><delete-button: update="member-count"/></card:>
So, really, it seems that managing the contexts in this kind of
situation is not obvious to me. Any help is greatly appreciated !
Thanks,
norguir
On Sep 5, 5:42 pm, norguir <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am missing some pointers on how to do model validation in complex
> forms.
>
> As an example with the Agility tutorial I have tried to add a validate
> method to the ProjectMembership class:
>
> def validate
> errors.add("The new member name",
> ActiveRecord::Errors.default_error_messages[:invalid]) if [EMAIL PROTECTED]
> end
>
> This works fine but produces a javascript generated dialog box instead
> of rendering the error messages at the top of the page, which to me,
> poses some usability problems. Would someone point me to some hints on
> how to turn this on ?
>
> Thanks !
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---