Dear all
Are there any method to create or update something? (if something exist, then update, else create....where something is the primary key)
Something like.... if Klass.find_by_something( xxx ) Klass.update_attribute your_hash else Klass.create your_hash end
This is similar to the AR dynamic finder Klass.find_or_create_by_something()..., but I want a Klass.create_or_update_by_something...Any idea??
Many thanks Valentino