scott
1
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
scott
2
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 }) %>
scott
3
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
scott
4
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?