Select box's

Hi,

I have this code for a select box,

<%= select(“plugin”, “plugcats”, Plugcats.find_all.collect {|p| [
p.title, p.id ] }, { :include_blank => true }) %>

at the minute it extracts teh requried data, but submits the data as
params[‘plugin’][‘plugcats’]

how can I get it to submit it as [‘plugin’][‘plugcat_id’]

thanks

how can I get it to submit it as [‘plugin’][‘plugcat_id’]

thanks

have you tried?
<%= select(“plugin”, “plugcat_id”, Plugcats.find_all.collect {|p| [
p.title, p.id ] }, { :include_blank => true }) %>

Ricardo C. wrote:

how can I get it to submit it as [‘plugin’][‘plugcat_id’]

thanks

have you tried?
<%= select(“plugin”, “plugcat_id”, Plugcats.find_all.collect {|p| [
p.title, p.id ] }, { :include_blank => true }) %>

yeah, it just says undefined method

ss wrote:

Ricardo C. wrote:

how can I get it to submit it as [‘plugin’][‘plugcat_id’]

thanks

have you tried?
<%= select(“plugin”, “plugcat_id”, Plugcats.find_all.collect {|p| [
p.title, p.id ] }, { :include_blank => true }) %>

yeah, it just says undefined method

shouldn’t Plugcats should be Plugcat?