How is the calendar_date_select_value accessed in a before_create_save
method? (I get the same error if there's no before_create_save method
too.)
Code:
(from the controller config block)
config.columns[:meeting_date].options = {:start_year =>
0.years.from_now, :end_year => 3.years.from_now}
def before_create_save(record)
# March 10, 2009
md = record.meeting_date
sd = md.split(%r{,\s*})
sdd = Date.new(sd.last, Date::MONTHNAMES.index(sd.second),
sd.first)
record.meeting_date = sdd
end
Error I get:
Mysql::Error: Column 'meeting_date' cannot be null: UPDATE `meetings`
SET `meeting_date` = NULL ...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---