fixing handling of media as STI not being able to deal with nested attributes. fixed by using actual var instead of var name in form and passing var name in option :as