`assoc = options[:class_name] ? options[:class_name].to_s.constantize : name.to_s.camelize.constantize` looks much better for me