Очень новая работа с рельсами. Я внедрил базовую систему входа, используя Devise. Я пытаюсь добавить пару новых полей (bio: string, name: string) на страницу sign_up. У меня есть все, что отображается правильно, и новые поля добавляются в базу данных (когда я просматриваю его в SQLbrowser), однако они не заполняются и после того, как пользователь отправляет форму sign_up, появляется сообщение, в котором говорится:
Unpermitted parameters: bio, name
Я добавил 2 строки в _devise_create_users.rb
# added
t.string :bio
t.string :name
И у меня они появляются в schema.rb
ActiveRecord::Schema.define(version: 20130629002343) do
create_table "users", force: true do |t|
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
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.datetime "created_at"
t.datetime "updated_at"
t.string "shortbio"
t.boolean "admin", default: false
t.string "realname"
t.string "name"
t.string "bio"
end
add_index "users", ["email"], name: "index_users_on_email", unique: true
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
end
Мой user.rb
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
#:token_authenticatable, :confirmable,
#:lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
end
Является ли эта проблема чем-то связанным с сильными параметрами? Мне тяжело обволакивать вокруг себя и где/как реализовать.