Chapter 8; File Upload Form; Name Error |
![]() ![]() |
Chapter 8; File Upload Form; Name Error |
May 30 2009, 10:23 PM
Post
#1
|
|
|
|
I'm very new to Rails, so please bear with me.
I'm getting a name error when I try to look at my show view in my browser. I followed the book's instructions verbatim, I even included the change to the code on page 124 as noted in the errata. Any tips on what I may be doing wrong here? Here's the error that I'm getting: CODE undefined local variable or method `extension' for #<Theater:0x24fa2d4> Extracted source (around line #4): <table width="730" border="0" align="center" id="show_table"> 2: <tr> 3: <td rowspan="6" align="left" valign="top"> 4: <% if @theater.has_photo? %> 5: <%= image_tag @theater.photo_path %> 6: <% else %> 7: No photo. Note: "theater" is the name of the table that I'm inserting the extension column into; it takes the place of "person" in the book example. Also, I'm running Rails on a Mac and editing with Xcode, if that helps. Thanks very much! |
|
|
|
Jun 1 2009, 06:37 AM
Post
#2
|
|
|
|
It's a little tricky, because you've added it to a different model, but we're guessing that you probably haven't run the migration that adds the extension field to your Theater model.
Could you take a look at that and let us know? Thanks! |
|
|
|
Oct 14 2009, 07:38 PM
Post
#3
|
|
|
|
to OP... any more comments??? hard to help without clarification
thanks, james @ auto insurance for young drivers |
|
|
|
Nov 14 2009, 07:22 AM
Post
#4
|
|
|
|
I don’t usually reply to posts but I will in this case. Thank you for all the information.
-------------------- |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd November 2009 - 04:49 PM |