Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def associate_by(name, attributes)
- Host.authorized(:view_hosts, Host).joins(:primary_interface).
- where(:nics => {:primary => true}).
- where("nics.#{name}" => attributes).
- readonly(false).
- first
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement