Hi, Client has Routes (has_many). The subform for RouteController has
these fields:
config.columns[:route_type].form_ui = :select
config.columns[:route_type].options = {:options => {"IP"=>false,
"Register"=>true}}
config.columns[:address].label = "IP[:port]"
In case 'route_type' is "IP" (false) then the field 'address' must be
filled (there is a validation in the model in such case).
However in case 'route_type' is "Register" (true) then 'address' can be blank.
The problem:
I create a new Client and I see the subform for its Routes. I select
"Register" in the 'route_type' select and leave 'address' blank
(correct). I also fill the required fields of the Client itself and
press "save".
The Route has not been saved! It has been ignored by active_scaffold,
perhaps it assumes I've not filled the entry under 'Routes' subform.
But in fact I've gives "Register" (tru) value to 'route_type' field,
is it not enough?
So how can I instruct AS that I do want to create such entry if
'route_type' is true even if the rest of the fields are not filled
(not required in fact)?
Thanks a lot.
--
Iñaki Baz Castillo
<[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.