I am using devise gem and i wanna to create admin
rails g migration add_admin_to_user
in the db
def change
add_column :users, :admin , :boolean , {default: false}
end
def user
def admin?
user=User.create(email: "info@presale.ca",password: "12345678")
user.admin=true
user
user.save
admin
end
end
in the index page
<% if current_user && current_user.admin? %>
<% end %>
theres something wrong in the def user how to fix it please?