Permalink
Commits on Nov 8, 2011
  1. Updated Changelog.

    thhermansen committed Nov 8, 2011
  2. Fixed a couple of failing specs in 1.9.3.

    (I am currently on preview though).
    thhermansen committed Nov 8, 2011
  3. Gem file updated.

    thhermansen committed Nov 8, 2011
Commits on Oct 24, 2011
  1. Bump version.

    thhermansen committed Oct 24, 2011
Commits on Oct 10, 2011
  1. Made it possible to force Persistence operations. Opposite to suppress.

    For instance, callbacks in embedded objects should be executed within
    force, which will ensure that operations are enabled.
    thhermansen committed Oct 10, 2011
Commits on Oct 9, 2011
  1. Updated changelog.

    thhermansen committed Oct 9, 2011
  2. Callbacks on embedded when owner.save().

    The before- and after validation is ran cos
    parent will validate associated. Thus, we don't
    need to run validations in the embeds_many proxy's
    parent_will_be_saved!
    
    Save is stilled applied, so the rest of the
    callbacks are applied thereafter.
    
    Now, there is a problem with embedded before-callbacks.
    Normally, returning false inside of one will short
    circuit the save call, but in this case it does not.
    thhermansen committed Oct 9, 2011
  3. Callbacks on Embedded records behaves equal to Table.

    Fixed a couple of cases when validations where
    running "wild" on embedded. Dunno if I have fixed
    it all, but at least it behaves a bit nicer now.
    thhermansen committed Oct 9, 2011
  4. Updated callback spec. Rest embeds_many proxy before tests.

    ..or else record will contain callback history for
    creations as well.
    
    I see two problems with the situation as it is now:
    
    1. Calling save on an embedded record when the owner
       is not persisted will call save on the same
       record again when owner is saved and informs
       embeds many proxy that it is being about to be
       saved. Resulting in all callbacks fire again
       on the record which issued the save in the first
       place.
    2. Calling save on an embedded record when the owner
       is not persisted will first validate the embedded
       record, then the owner will validate all associated
       records, including the one record which issued
       the save and therefor is validated.
    
    (..there might be more situations as well)
    thhermansen committed Oct 9, 2011
  5. Completed refactor of callbacks spec. Is applied on Table & Embedded.

    ..and not surprisingly - the callbacks related to
    embedded records is a bit fucked up.
    thhermansen committed Oct 9, 2011
Commits on Oct 7, 2011
  1. When calling embedded.destroy embedded is removed in embeds_many coll…

    …ection.
    
    This should fix #72.
    thhermansen committed Oct 7, 2011
  2. record.destroy returns record.

    In fact; record.freeze returns record.
    thhermansen committed Oct 7, 2011
  3. Updated Changelog.

    thhermansen committed Oct 7, 2011
  4. Dirty state is now tracked correctly for new records.

    Fixes #75. The problem was:
        a = User.new :email => "wefwef"
        => #<User id: "15", ….. > a.email_changed?
        => false 
        ruby-1.9.2-p180 :003 > a.email = "dfgdfg"
        => "dfgdfg" 
        ruby-1.9.2-p180 :004 > a.email_changed?
        => true
    
    a.email_changed? will now return true on first
    query.
    thhermansen committed Oct 7, 2011
Commits on Oct 5, 2011
  1. Fixed a argument overflow problem with multiparameter assignment.

    It will now simply use the x number of arguments
    the initializer is expecting. 3 for Date and 6
    for Time.
    thhermansen committed Oct 5, 2011
  2. Silently ignore multi param on invalid format, setting value to nil.

    I don't know if we need to take care of this in
    another way, but as far as I see now; if the user
    chooses to manipulate the values sent via Rails'
    form date/time helpers, then we just don't care
    and we do set the value to nil silently.
    
    This should complete #71.
    thhermansen committed Oct 5, 2011
  3. Added time support for multiple parameters.

    Need to try more values which might triggers some
    parse errors, like non integer string values etc.
    thhermansen committed Oct 5, 2011
  4. Added multi parameter date support for ORM::Base#attributes=.

    Time will come next.
    thhermansen committed Oct 5, 2011
Commits on Oct 4, 2011
  1. Changed embedded database_id separator from '-|-' to '|'.

    Maybe it should be settable per class as well?
    thhermansen committed Oct 4, 2011
  2. RawData#inspect now simply delegates to it's value.

    Makes it easier to read raw_data hash on records.
    thhermansen committed Oct 4, 2011
  3. Added ability to push invalid record on to a embeds_many collection.

    But: pushing invalid records on to embeds_collection accepts them, but does not save parent.
    thhermansen committed Oct 4, 2011
Commits on Oct 3, 2011
  1. Updated some documentation for embeds_many / embedded_in.

    This completes #56, even though I guess we'll get stuff to fix after
    actually beginning to use this in the front-application for
    Companybook.
    thhermansen committed Oct 3, 2011