Thank you so much Mr. Colin I solved the problem. I forget i used the
instance of the customer
[def create
@customer = Customer.find(params[:customer_id])
@project = Customer.projects.create(project_params)
end] ..
It should be
[def create
@customer = Customer.find(params[:customer_id])
Thank you so much Mr. Sampath. I solved the problem. I forget that i
should used the instance of the customer
[def create
@customer = Customer.find(params[:customer_id])
@project = Customer.projects.create(project_params)
end] ..
It should be
[def create
@customer =
Use customer has_many: :projects
accepts_nested_attributes_for :projects
and then make customer view to handle project data or ( if u need above
approach ) add customer id to above _form.html.
if u need further help, please let me know. :)
On Sat, Oct 18, 2014 at 11:43 PM, Colin Law
Good day, I'm a beginner in rails I already develop a simple app in rails
but i want to upgrade the app to be an ajax, I already created the first
model customer but in the second model project where customer has many
projects and project belongs_to customer, those ajax form modal that i copy
On 18 October 2014 15:09, Pepeng Agimat eebasadr...@gmail.com wrote:
Good day, I'm a beginner in rails I already develop a simple app in rails
but i want to upgrade the app to be an ajax, I already created the first
model customer but in the second model project where customer has many
5 matches
Mail list logo