--
You received this message because you are subscribed to the Boston Ruby Group mailing list
To post to this group, send email to boston-r...@googlegroups.com
To unsubscribe from this group, send email to boston-rubygro...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/boston-rubygroup
var_array = template.scan(/(\@[a-z]+[0-9a-z]*)/i).uniq
I think Alex's suggestion is the best you could come up with.
Why do you want to list the available instance variables?
--Wyatt
The current approach of thinking in terms of instance variables won't work well here (consider how hard it would be to debug errors, for example). Ruby offers so many tools: objects, procs, DSLs, etc. that I'm sure there's an elegant Ruby way to handle what you're trying to do. I'd love to offer some suggestions but it's not clear to me what the ultimate problem is (for example, the users you mention...are they Ruby programmers or someone sitting on the other side of a browser?). I can understand if you don't feel like describing the problem in full here. Regardless, it's almost certainly desirable to define your own abstraction rather than trying to guess based on what instance variables are defined.
I know radius lets you define a tag_missing method that you could use to
capture missing tags
Some other options include:
http://github.com/defunkt/mustache
http://www.liquidmarkup.org/
-Pascal
I'm trying rails 3.0.0. and ruby 1.9.2 via rvm with nginx-0.8.35 and passenger 2.2.15. At first things work fast, but as more request start to come in, the instance would start to choke. There would be ruby process taking 50% of CPU and it would take up to few minutes to fulfill a simple request which would normally take few ms.
Prior to this everything was working reasonably well with rails 3 and ree and the same versions of nginx and passenger. The last thing that I did which threw it off was switching to ruby 1.9.2.
Has anyone had a success running this or similar setup in prod?
Any help or suggestion would be greatly appreciated since I'm running out of options at this point and really need to get it figure out rather soon.
Dmitry