undefined method `merge' for 5:Fixnum - Hidden Field

Ruby on RailsWeb Development

Just a quick post on an error I ran into today while using hidden fields:

undefined method `merge' for 5:Fixnum

27:   <div class="actions">
28:      'button' %>
29:   </div>
30:   
31: 
32: 

Thankfully this is an easy fix, simply amend your code as follows:

<div class="actions">
     'button' %>
</div>
    @upload.product_id %>

And that’s all there is to it, let me know if there are any issues.

2 comments

Comments from the original blog are preserved here. New comments are closed.

  1. Josh Johnson

    Thanks so much for this!!! I was pulling my hair out with frustration over this problem. Your solution took care of it perfectly!

  2. Errors
    In reply to Josh Johnson

    No worries Josh, thanks for the feedback