Displaying 1 result from an estimated 1 matches for "add_crew".
2012 Apr 19
1
active admin undefined method `' for nil:NilClass
...Class`
i dont know what happened but it run few days ago and tested it once but
now it raises this error are there possible way to solve this?
def create
@package = Package.find(params[:package_crew][:package_id])
crew = Crew.find(params[:package_crew][:crew_id] )
@package_crew = @package.add_crew(crew.id)
if @package_crew.save
redirect_to {admin_package_crew_url}
end
end
thanks in advance more power to us all
i tried this
def create
#pid = params[:package_crew][:crew_id] if params[:package_crew]
pid,cid = 2 #tried nil,0..10
if params[:package_crew]
pid = params[:pa...