What version of Hobo and Rails are you using?

One of the first lines in the check-many definitions is this:

    <input type="hidden" name="#{param_name}[]" value=""/><% # ensure
all items are removed when nothing checked %>

Can you check to see if this line is appearing in your form and/or
makes it into the request data?

thanks,
Bryan

On Sun, Jun 10, 2012 at 1:11 PM, Lea Viljanen <[email protected]> wrote:
> What is the behaviour of check-many when all checkboxes are deselected
> during editing?
>
> I had thought it would send an empty set onwards, but I'm actually seeing
> the whole parameter omitted.
>
> Edit request with changing a check in the <check-many>:
>  Parameters: {"page_path"=>"/steward/registrations/20/edit",
> "authenticity_token"=>"...", "registration"=>{... "package_id"=>"1",
> "days"=>["@18", "@19", "@20"], "prices"=>["@9"]}, "id"=>"20"}
>
> The above works just fine.
>
> An now an edit request with removing all checks from the <check-many>:
>  Parameters: {"page_path"=>"/steward/registrations/20/edit",
> "authenticity_token"=>"...", "registration"=>{... "package_id"=>"1",
> "days"=>["@18", "@19", "@20"]}, "id"=>"20"}
>
> And this means the check removal is never propagated to the database.
>
> My Registration model has:
>
>   has_many :price_items, :dependent => :destroy
>   has_many :prices, :through => :price_items, :accessible => true
>
> --
> Lea 'LadyBug' Viljanen
>
> --
> 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.

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