okay, so ive got a view page of 'columns', each comprised of a name and code. ive got a button to 'add columns' and i want it to pass it an integer parameter so i can set up the default number of boxes for adding
so in my view ive got = link_to "Add columns", new_column_path, :number => 5 and in my controller: def new @columns = [] params[:number].to_i.times { @columns << Column.new } end so basically i just want to read number passed from the link. there will be links from other places that have different values passed (not 5) what am i doing wrong? or is there a better way of approaching it? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.