Rails novice Ques.I'm not able to find the reason for why my strong parameters are not getting saved in the database. I'm not using scaffolding to create my models rather using the rails g model customer name:string email:string command. The same gets added when using rails console.
My customer.rb
class Customer < ActiveRecord::Base
has_many :products,through: :order
end
My usercontroller
class UserController < ApplicationController
def login
@Customer=Customer.new(master)
@Customer.save
end
def home
end
private
def master
params.require(:customer).permit!
end
end
my html code:
<form action="login">
name <input type="text" name="customer[name]">
email<input type="email" name="customer[email]">
<input type="submit" value="enter">
</form>
Still i get the error of param :customer not found