Displaying 1 result from an estimated 1 matches for "plannam".
Did you mean:
planname
2008 Sep 15
2
Passing an array into controller
...d
}
The controller is:
def advanced_plan_summary
@ids = params[:plans]
@ids = @ids.split('','')
@plans = Plan.find(@ids.to_a)
if @plans[0].nil?
flash[:warning] = "Advanced Plan Selection Empty!!!"
redirect_to(:action => :index)
end
@planname = []
for plan in @plans
@planname << " " + plan.plan_name
end
flash[:notice] = "Plans picked = #{@planname}"
#...
end
I select plans with the id 58 and 32. It only seems to find the item
58???
Here is what my development log looks like:
Processing G...