I have a complex named scope like the following.
named_scope :foo, lambda {|foo, bar|
foo.each do |d|
#foo = "this line doesn''t work #{s}"
baz = "something like this works " + s
end
bar.each do |b|
end
{
:conditions => {''baz'' => 1}
}}
It does some pre-processing to calculate the :conditions hash. The
weird bit is that I get a bizarre syntax error when I try to use
double quoted strings with substitutions. If I use a syntax such as
"A"+str+"B" it''s ok, but "A#{str}B" is a
syntax error. Any thoughts?
I''ve tried to replicate it in pure ruby lambda functions but
wasn''t
able to, leading me to think it may be related to the named scope.
-Jeff
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---