Render partial yields "dynamic constant assignment"

I’m getting a syntax error when rendering a partial. This is a simple
html partial with one instance variable inside it. Rendering as a
“template” instead of as a partial works just fine. The error occurs 3
lines after the last line of HTML code in the partial. There is no line
72! Here is the error:

SyntaxError in Building_blocks#preview
Showing building_blocks/_BB02.html.erb where line #72 raised:

compile error
C:/Ruby_Development/sbtool/app/views/building_blocks/_BB02.html.erb:-2:
dynamic constant assignment
BB02 = local_assigns[:BB02]
^
C:/Ruby_Development/sbtool/app/views/building_blocks/_BB02.html.erb:-1:
dynamic constant assignment
BB02_counter = local_assigns[:BB02_counter]

Extracted source (around line #72):
69:
70:

Application Trace:
app/views/building_blocks/_BB02.html.erb:72:in compile_template' app/controllers/building_blocks_controller.rb:99:inpreview’
script\server:3
-e:2:in `load’
-e:2

On 29 May 2008, at 16:04, Corey M. wrote:

I’m getting a syntax error when rendering a partial. This is a simple
html partial with one instance variable inside it. Rendering as a
“template” instead of as a partial works just fine. The error
occurs 3
lines after the last line of HTML code in the partial. There is no
line
72! Here is the error:

Don’t start your partial names with a capital letter. rails creates a
local variable for the object corresponding to the partial and local
variables can’t start with a capital letter

Fred


My ramblings: http://www.spacevatican.org

Frederick C. wrote:

On 29 May 2008, at 16:04, Corey M. wrote:

I’m getting a syntax error when rendering a partial. This is a simple
html partial with one instance variable inside it. Rendering as a
“template” instead of as a partial works just fine. The error
occurs 3
lines after the last line of HTML code in the partial. There is no
line
72! Here is the error:

Don’t start your partial names with a capital letter. rails creates a
local variable for the object corresponding to the partial and local
variables can’t start with a capital letter

Fred


My ramblings: http://www.spacevatican.org

Doh! I should know that. Standard ruby “convention”.

Thanks Fred, as always!