Nischay Namdev
Nischay Namdev

Reputation: 593

Active admin user model attribute not submitting

I added an attribute to admin_users model of active admin, the attribut was added using a migration, the code for the migration is :

class AddHostelToAdminUsers < ActiveRecord::Migration
  def change
    add_column :admin_users, :hostel, :string
  end
end

now when I am submitting the form to generate new admin I am getting nothing on place of that attribute ,the object is being created with out :hostel attribute Details of user see the hostel filled is empty. I entered all details carefully : Form for creating admin

Upvotes: 0

Views: 136

Answers (1)

Nischay Namdev
Nischay Namdev

Reputation: 593

Hey guys I just forgot to add attribute to permist !!

  permit_params :email, :password, :password_confirmation,:hostel

now its working well.

Upvotes: 1

Related Questions