RuPy 2007 or why Rails still amazes me

Last weekend I was speaking on RuPy conference. I had time to take part only on Sunday, so I missed first day, and what is probably key event of every conference, evening meeting in bar. Well, maybe next year.

For RuPy I had to refresh my speaker skills (last my speak on conference was something like in 2002). Well, I hope I did useful presentation. For me was very useful ;-) since I have learned a few new things. First, I was talking about EJS templates (minus mor plugin by Dan Webb). EJS provide efficient way to generate JavaScript code from Rails view level. Well day before my presentation I found simpler solution, than EJS to JS generation. In action set headers["Content-type"] = "text/javascript" and in RHTML template write JavaScript code with well known RHTML symbols <%= and <%. I did not found this though last few months – Rails still makes me nice surprises ;)

I was struggling with send_data a lot to generate code for RNS and solution was so simple. But, anyway, as I said in Poznan – I will still use EJS templating system. When I need to generate a lot of JS code I see two reasons to use EJS. First, that having another extension (.ejs) to separate JS views is right way, and secondly (and most important) EJS provides js helper, which escapes Ruby output to JavaScript safe string (like h helper for HTML in RHTML templates).

Second thing I learned from my presentation is that I can bear well with public coding… Result? Probably in May I will prepare session with live coding to introduce Rails and Ruby to people who did not drink Rails Kool-Aid yet. I will disclose more details ASAP I will know more – when, where and what exactly.

And talking about my presentation – You can download it: slides in PDF (with some remarks) and code from live session.

2 thoughts on “RuPy 2007 or why Rails still amazes me

  1. Pingback: RuPy : NetManiac

  2. Pingback: RuPy 2007 szafranek.net

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.