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

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

php - Using str_replace to translate a MySQL Table in html -

asp.net mvc - Cannot display error message on Editor or EditorFor -