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

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -