Convert role_setter to coffeescript and simplify it.