change modal in view according to bootstrap3 and query in controller

There is still an error "undefined method `scoped' for"