Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class IpInterface < Sequel::Model
- many_to_one :layer3_interface, :key => :id
- def before_save do
- if new?
- self.layer3_interface = Layer3Interface.new
- end
- end
- end
- class Layer3Interface < Sequel::Model
- one_to_many :ip_interfaces, :one_to_one => true, :key => :id
- end
Add Comment
Please, Sign In to add comment