Re: [Rails] Ajax bootstrap modal in rails 4.. Newbie here!

2014-10-20 Thread Pepeng Agimat
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])

Re: [Rails] Ajax bootstrap modal in rails 4.. Newbie here!

2014-10-20 Thread Pepeng Agimat
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 =

Re: [Rails] Ajax bootstrap modal in rails 4.. Newbie here!

2014-10-19 Thread Sampath Munasinghe
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

[Rails] Ajax bootstrap modal in rails 4.. Newbie here!

2014-10-18 Thread Pepeng Agimat
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

Re: [Rails] Ajax bootstrap modal in rails 4.. Newbie here!

2014-10-18 Thread Colin Law
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