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 _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Local variables must start with lowercase. Otherwise Ruby interprets them as a constant. Kent. On Monday 05 December 2005 21:54, Márcio Francisco wrote:> 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
ksruby wrote:> Local variables must start with lowercase. Otherwise Ruby interprets > them as a > constant.So how do you create a local constant? James -- Posted via http://www.ruby-forum.com/.
In Ruby there is no such thing as a local constant. Kent. On Wednesday 07 December 2005 12:05, james wrote:> ksruby wrote: > > Local variables must start with lowercase. Otherwise Ruby interprets > > them as a > > constant. > > So how do you create a local constant? > > James