ruby on rails - ActionController::BadRequest (Invalid request parameters: expected Array (got Rack::QueryParser::Params) for param `columns') -
i want user able check off column , pick various formats thorough select tag. looks however, when submit form error , can't seem figure out wrong.
= form_tag table_update_columns_path(table), :method => :post %table.table.table-hover.table-striped.table-bordered.data-table{:style => "width: 600px;"} %tr %th column %th data type %th format - table.get_columns.each |k,v| %tr %td.createorquerycolumns = hidden_field_tag "table[columns][#{k}]", "false" %span= check_box_tag "table[columns][#{k}]", "true", (v == "true" ? true : false) %h6= k %td = hidden_field_tag "table[data_types][#{k}]", "" - if table.data_types.nil? = select_tag "table[data_types][#{k}]", options_for_select(table.data_types), { :class => 'form-control input-sm' } -else = select_tag "table[data_types][#{k}]", options_for_select(table.data_types, table.data_types[k]), { :class => 'form-control input-sm' } %td = hidden_field_tag "table[formats][#{k}]", "" - if table.formats.nil? = select_tag "table[formats][#{k}]", options_for_select(table.formats), { :class => 'form-control input-sm' } -else = select_tag "table[formats][#{k}]", options_for_select(table.formats, table.formats[k]), { :class => 'form-control input-sm' } = submit_tag "save", :class => "btn form-control btn-primary"
Comments
Post a Comment