small medium large xlarge

03 Apr 2008, 11:24
McKracken (1 post)

Hello to all! I’ve a problem with the helper in Iteration E1:

      <%=  :pay_type,
                          :prompt => "Select a payment method" %>

When i run it, it shows this error message:

undefined method `pay_type’ for #

Extracted source (around line #20):

17: </p> 18: <p> 19: Pay with: 20: <%= :pay_type, 21: Order::PAYMENT_TYPES, 22: :prompt => “Select a payment method” %> 23: </p>

This let me think that i’ve to define something in the Order model, but following the book this isn’t so…where’s the problem? Thank you

16 May 2008, 14:46
Fabrice Touzain (1 post)


I had the same error message. This was only a typo error in 00?_create_orders.rb migration file for the database (I typed pya_type instead of pay_type). (see at AWDwRoR 2nd Ed. on page 131 (printed version) for more details about this migration file) I hope you did the same.


You must be logged in to comment