Re: [Rails] Calling method from model create error

2016-03-06 Thread Colin Law
On 6 March 2016 at 08:00, Naveed Alam wrote: > Dear Experts/Friends > > I created a model for and moved it to a sub folder in my model's > directory. > > Then wrote in the existing controller named employee the below code to > add roster duty. > > def add_rosterduty() >@rosterduty = RosterDuty

[Rails] Calling method from model create error

2016-03-06 Thread Naveed Alam
Dear Experts/Friends I created a model for and moved it to a sub folder in my model's directory. Then wrote in the existing controller named employee the below code to add roster duty. def add_rosterduty() @rosterduty = RosterDuty.new() @employee = Employee.find(params[:id]) if request