Hi, Client has_many Trunks. In TrunkController I set:

  def before_create_save(trunk)
    pre_save(trunk)
  end

  def before_update_save(trunk)
    pre_save(trunk)
  end

  def pre_save(trunk)
    Utils.strip(trunk.ip_addr)
  end
  private :pre_save


Utils.strip(trunk.ip_addr) is a method defined by me which does
"strip!" in case the argument is a string.

When I create/update a Trunk using TrunkController the "ip_addr"
string is stripped correctly, but when I create such Trunk using a
subform of a Client, "ip_addr" is not stripped, this is,
before_create_save and before_update_save() are not executed for
subforms. Do I miss something? I strongly think such functions should
be executed also for subforms.

Thanks.

-- 
Iñaki Baz Castillo
<[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.

Reply via email to