Help on error: dynamic constant assignment


#1

Rails 0.14.3
Does anyone have an idea on this error:

compile error
./script/…/config/…/app/views//work_order_lines/_form.rhtml:-2:
dynamic constant assignment
QB_estimate_number = local_assigns[:QB_estimate_number] if
local_assigns.has_key?(:QB_estimate_number)

It was generated by this render:
<%= render (:partial => “work_order_lines/form”,
:locals => {:wol => @work_order.id,
:QB_estimate_number =>
@work_order.QB_estimate_number}) %>

Any help on this?

thx


#2

Local variables must start with lowercase. Otherwise Ruby interprets
them as a
constant.

Kent.


#3

ksruby wrote:

Local variables must start with lowercase. Otherwise Ruby interprets
them as a
constant.

So how do you create a local constant?

James


#4

In Ruby there is no such thing as a local constant.

Kent.