error with other attributes in devise ruby on rails

0

Hello, I have an error. I have several attributes in the users table that I want to put in devise but I get this error.

database

 create_table "users", force: :cascade do |t|
    t.string "name"
    t.string "cargo"
    t.string "gerencia"
    t.string "localidad"
    t.string "nombreemail"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.string "email", default: "", null: false
    t.string "encrypted_password", default: "", null: false
    t.string "reset_password_token"
    t.datetime "reset_password_sent_at"
    t.datetime "remember_created_at"
    t.integer "sign_in_count", default: 0, null: false
    t.datetime "current_sign_in_at"
    t.datetime "last_sign_in_at"
    t.string "current_sign_in_ip"
    t.string "last_sign_in_ip"
    t.index ["email"], name: "index_users_on_email", unique: true
    t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
    end

this is the form

new.html.erb

  
        <div class="panel panel-default devise-bs">
           <div class="panel-heading">
            <h4><%= t('.sign_up', default: 'Registrarme') %></h4>
           </div>
           <div class="panel-body">


            <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { role: 'form' }) do |f| %>

<%= f.input :name %>

  <div class="form-group">
    <%= f.label :email %>
    <%= f.email_field :email, autofocus: true, class: 'form-control' %>
  </div>
  <div class="form-group">
    <%= f.label :password %>
    <%= f.password_field :password, class: 'form-control' %>
  </div>
  <div class="form-group">
    <%= f.label :password_confirmation %>
    <%= f.password_field :password_confirmation, class: 'form-control' %>
  </div>
<center> <%= f.submit t('.sign_up', default: 'Sign up'), class: 'btn btn-primary' %></center> 
<% end %>

             <% = render 'devise / shared / links'% >

    
asked by MIGUEL ANGEL GIL RODRIGUEZ 23.10.2017 в 01:14
source

1 answer

1

The problem is that you are using a helper of the gem simple_form input , you must put text .

<%= f.text :name %>
    
answered by 01.12.2017 в 16:46