Frederick Cheung wrote:

> Forward.new(attributes) boils down to:
> - create a blank instance
> - attributes.each {|k,v| object.send("#{k}=",v)
> 
> hashes are unordered so you can't rely on domain being set before
> destination is.

Ok, so I need to take care of this afterwards. Any comments on below
solution/workaround?

>> I tried the following callback in Forward:
>>  before_validation_on_create { |record|
>> record.destination=record.destination}
>> and it seems to work. Is this correct, or might this have some side
>> effects? It also seems quite hacky, is there a cleaner way?

Regards
Rainer Frey


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to