Problem z controllerem

[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

moze cos takiego na poczatku daj:

helper_method :handle_specializations_colleges

strzelam troche wiec nie wiem czy pomoze

dzieki za pomoc ale teraz mam cos takiego

undefined method `helper_method' for #<CollegesController:0x2c053bc>

ech widze teraz jeszcze jedna rzecz wez sprobuj nie zagniezdzac tego w metodzie update daj ta czesc na sam koniec

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

a nie w metodzie

wywal to helper_method i zobacz

ok zadzialalo
wielkie dzieki

spoko