The problem
/app/controllers/users_controller.rb:29: syntax error, unexpected ',', expecting => name, roles: [], (something here)
The scenario
In users_controller.rb:
params.require(:user).permit(:name, roles: [])
Diagnostics
- The problem happens when I access any page related to users_controller.rb;
- If I use :roles => []instead ofroles: [], the error is the same;
- If I change roles: []for:roles, everything goes okay.
Environment
I'm running on CentOS 6.5 with Rails 4.
 
    