This is what is needed to fix the issue:
      def considered_true?(value)
        !value.blank? && value != "false" && value != "0" && value != 0
      end

That is, we need to make sure the string is not blank. This can happen if
the field is set to nil rather than false.

Jacques, since you seem to be spearheading this effort, can you add the
"nil" case to the spec and make the change above? Thanks.

..tony..

On Thu, Feb 5, 2009 at 4:33 AM, johan pretorius
<[email protected]>wrote:

>
> cult_hero,
>
> > So, one possible solution is:
> >
> > def considered_true?(value)
> >   value && value != "false" && value != "0" && value != 0
> > end
>
> I've made that change to the library, but am still experiencing the
> same problem (eg. checkbox always checked when using model).  I'm
> using the latest versions of merb, merb-helpers and datamapper, and a
> fairly recent version of haml).  I can confirm that the database is
> being updated correctly.
>
> Apart from restarting Merb, are there any additional reloading or
> coding changes required?
>
> thanks,
>
> Johan
>
> >
>

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

Reply via email to