the following view
<% @packageoffers.each do |packageoffer| %>
<% if @packageoffers_mss.include?(packageoffer) %>
<% elsif @availables.include?(packageoffer) %>
<%= render 'packageoffer', collection: @packageoffers %>
is returning an NameError undefined local variable or method 'packageoffer' when trying to process the partial _packageoffer.html.erb upon a line like the second taht follows:
<% item_sale_price = @item_price.sale_price * params[:quantity].to_i %>
<% markup_price = ((item_sale_price + (packageoffer.price * @r * @q)) * (1 + (@user.markup.to_d / 100) ) ) %>
note: @item_price is itself an item of an array section and had to be declared as an instance variable to pass it along <% @item_price = @allotments.select{ |a| a.section_id == section.id }.first
Thus, notwithstanding following the rails documentation guidelines, I cannot process the array's item. Where lies the mistake?
<%= render partial: 'packageoffer', collection: @packageoffers %>or just<%= render @packageoffers %>render partial:The rote of callingrender 'partial'is strong...<%= render packageoffer %>.