<%= form_for @user1 do |f| %>
Username: <%= f.text_field :username %> <br />
Password: <%= f.password_field :password %> <br />.
Email: <%= f.email_field :email %> <br />
<%= submit_tag "Add" %>
<% end %>
I am new to ruby ββand I am trying to create simple programs, but I have this error and I can not understand why. I have this error
undefined method `users_path' for #<#<Class:0x000000020576f0>:0x0000000335d5d8>
What is the solution here?
class UserController < ApplicationController
def add
@user1 = User.new
respond_to do |format|
format.html
format.json {render :json => @user1}
end
end
source
share