Many thanks fot the fast answer! Do I have to pay? ;)

On 24 Feb, 16:27, "Sergio Cambra .:: entreCables - Symbol Servicios
Informáticos S.L. ::." <[email protected]> wrote:
> El Tuesday 24 February 2009 16:17:36 Antonio Bardazzi Multicore-Sistemi.com
> escribió:
>
>
>
> > 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.
>
> AS previous to rails-2.2 don't save records with all fields boolean or date.
> With latest AS (rails 2.2 or higher), you can turn off blank rows and AS won't
> check for empty records.
>
> --
> Sergio Cambra .:: entreCables S.L. ::.
> Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
> T) 902 021 404 F) 976 52 98 07 E) [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
-~----------~----~----~----~------~----~------~--~---

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

Reply via email to