0

Going from ruby-2.1.2@rails-3.2.18 to ruby-2.4.0@rails-5.0.2.

The following stanza throws an undefined method `reqdb' for #
 <%= form_for :page, :url => {:odbinsight => :reqdb} do |f| %>
   <% if @mywkbks != nil %>
   <%= f.collection_select :reqdb, @mywkbks,:name, :title, 
      :include_blank => false, :prompt => "Workbook?" %>    
 <% end %>

I have also used @reqdb, same error: The log shows data from the controller:

DEBUG:0:@reqdb = nil |@reqpg = nil|@name = nil|@mywkbks=[#<Page id: 1,
name: "NB001", title: "Something">, #<Page id: 2, name: "dev", title:
"dev prototyp workbook">]

(Note: pglmt and reqdb are not table column names, but temp variables.):

 def page_params   
   params.require(:page).permit(:name, :title, :body,
     :accs_level, :parent_id, :navlabel, 
     :position, :redirect,
     :action_name,:controller_name, :pglmt, {:reqdb => []})  
 end

I have also had the stanza with just: ....pglmt, reqdb) with the same error resulting.

Thanks for your comments.

Sergio Tulentsev
  • 226,338
  • 43
  • 373
  • 367

0 Answers0