Reputation: 5411
I want to customize the value inserted in the column in the controller and i want to insert a null value in it. In this way :
@users.to = null
Upvotes: 0
Views: 2118
Reputation: 27657
I believe you want:
@user.to = nil
You may have to run a migration to ensure the column allows NULL values:
change_column :users, :to, :string, :null => true
Upvotes: 3