Ruby syntax error: unexpected tIDENTIFIER, expecting keyword_end -
error: /home/g3mini/desktop/management/app/controllers/user_controller.rb:3: syntax error, unexpected tidentifier, expecting keyword_end @users user.all ^
code:
class usercontroller < applicationcontroller def index @users user.all end def create end def store @user = user.new(params.require(:user).permit(:userame,:password)) @user.save redirect_to '/' end end
could please tell me going wrong? (total noob here) thanks,
g3
the problem in use of is
instead of =
. should use: @users = user.all
Comments
Post a Comment