done. *appreciate*

On Nov 9, 8:59 pm, Bryan Larsen <[email protected]> wrote:
> It seems to me that validations are the right thing to use for this case.
>
> You can just go
>
>     validates_length_of :items, :minimum => 1
>
> Bryan
>
> On 10-11-09 03:29 PM, Peter Ehrlich wrote:
>
>
>
>
>
>
>
> > Hello!
>
> > I like the permissions system a lot, its pretty cool.  Edit_permitted
> > makes sense.  Why is there no new_permitted?
>
> > For example, suppose I want to make it illegal to create a new record
> > (with the permissions system) which is devoid of associated items.  It
> > might look something like this:
>
> > def create_permitted?
> >      acting_user.administrator?&&  !items.empty?
> >    end
>
> > However, of course, the form is no longer displayed, because items
> > don't exist yet.
>
> > Solution?  Go in to the do_create action? Patch hobo core? (How easy
> > or good would that be?)
>
> > --Peter

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