On Miércoles, 5 de Mayo de 2010 14:10:52 Iñaki Baz Castillo escribió:
> 2010/5/5 Sergio Cambra .:: entreCables S.L. ::. <[email protected]>:
> >> Yes, but this doesn't work in list view in which I still see
> >> true/false. Do I miss something?
> >
> > It wasn't working for integer columns, I had used it only with string
> > columns. It's fixed currently in master branch.
>
> I've installed master branch and t doesn't work correctly:
>
> I've a column TINYINT(1) with values 0 and 1. in the controller:
>   config.columns[:color].form_ui = :select
>   config.columns[:color].options = { :options => [["white",false],
> ["black",true]] }
>
> Then in the list and show views I see  values "black" / "No".

AS was using "white" and true as possible values, so when value was false it 
can't find the associated text, and it translates false to "No". I have fixed 
it 
now, so it uses the text as value only when value is nil.

>
>
> Using:
>   config.columns[:color].options = { :options => [["white",0], ["black",1]]
> } or:
>   config.columns[:color].options = { :options => [["white","0"],
> ["black","1"]] }
>
> Then in the list and show views I see  values "Yes" / "No".

It doesn't work because column is boolean instead of integer, so it can find 
the value ("true" or "false") in possible values.

>
>
> Using:
>   config.columns[:color].options = { :options => {"IP"=>false,
> "Registro"=>true} }
>
> Then in the list and show views I see  values "black" / "No".
>
>
> I expect I should see "black" / "white" in both the view and show views.
>
> --
> Iñaki Baz Castillo
> <[email protected]>

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en.

Reply via email to