How do I create a column in my table that is an input field?
i cant find it anywhere,
I’m looking to have the column for a price that is set at nil/empty, whatever.
Then the user inputs a price which is validated against a reserver price column, if successful it is added to cart.
It’s the first part I’m having bad trouble with as my cart is set up already
You’ll need a migration that adds a string field do your database. Check out the Rails guide for information on migrations, but it’s essentially this:
Then it will automatically be cast to a string when retrieved from the database. Once you have that field, you can use the form helpers: