Hi, Client model has_many Addresses.
The "addresses" table has a numeric column "mask" with default value 32.
When creating a new Address a subform is shown in order to allow the
user to assign an "address" for the current client. The problem is
that the subform "port" field comes with "32" by default but sometimes
I don't want to assign an "address". Unfortunatelly the Address model
has a "validates_presence_of :ip", this means that when I press submit
the "ip" is empty and the "mask" is "32" so it triggers a validation
error ("ip cannot be blank).
So the workaround is removing the default value of the table for the
column "mask" but I wonder if there is a more ellegant to solve it.
Thanks.
--
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.