[code] def update
@college = College.find(params[:id])
handle_specializations_colleges -----------> to jest linia 63
respond_to do |format|
if @college.update_attributes(params[:college])
flash[:notice] = ‘College was successfully updated.’
format.html { redirect_to(@college) }
format.xml { head :ok }
else
format.html { render :action => “edit” }
format.xml { render :xml => @college.errors, :status => :unprocessable_entity }
end
end
private
def handle_specializations_colleges
if params[‘specialization_id’]
@college.specializations.clear
specializations = params[‘specialization_id’].map { |id| Specialization.find(id) }
@college.specializations << specializations
end
end
end[/code]
wyskakuje mi taki blad
[code]undefined local variable or method `handle_specializations_colleges’ for #CollegesController:0x3cb10f8
app/controllers/colleges_controller.rb:63:in `update’[/code]
To jest wycinek kodu, siedzialem cala noc ale dalej nie wiem o co chodzi wiec jakby ktos mogl mi pomoc to bede bardzo wdzieczny.
Z gory dziekuje