I'm working with CalendarDateSelect-1.11, AS-1.2RC1, Rails-1.2.0,
Ruby-1.8.6.

It seems datetime columns from subforms are never saved.
If datetimes are not from a subform are saved correctly.

Exempla Gratia:
1- My Model has_many time_ranges, each TimeRange has 'from' and 'to'
datetimes.
2- model_controller/edit/id has time_ranges subform but do not saves
TimeRange at all.

With some logger.info steps I've found:
AS/lib/attribute_params.rb method attributes_hash_is_empty?
...
next true if column and [:boolean, :datetime, :date, :time].include?
(column.type)
...

Before this method the posted datetimes are OK: params[record] has
the correct name and datetimes values are correct, but
attributes_hash_is_empty?
return true so datetime for my plural association is never saved.

For now I changed the line to:
...
next true if column and [:boolean].include?(column.type)
...

It seems AS still do not save empty records.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

  • li... Antonio Bardazzi Multicore-Sistemi.com
    • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
      • ... Antonio Bardazzi Multicore-Sistemi.com

Reply via email to