We have some tables with two dates, a start date and end date
(valid_thru). The end
date is expected to be empty unless there is an actual termination
date for the item. When we load the tables from .csv files, we can
create them in this fashion. But in our on-line entry screen, we get a
pulldown list that I think is created by ActiveScaffold. It does not
allow a null entry and defaults to the current date.
Does anyone know a way to change that behavior for the termination
date field to allow a null entry, or to force the initial value to be
null?
I've tried adding this line to the controller:
config.columns[:valid_thru].options[:include_blank] = true
... but that doesn't seem to have any effect by itself. From what I've
read, the helper may come into play. If I do something like this:
def valid_thru_form_column(record,input_date)
date_select:record,:valid_thru,:include_blank=>true
end
def valid_thru_column(record)
record.valid_thru ? "${record.valid_thru}":""
end
... will that have the intended effect?
--
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.