Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

PIVOTAL LABS
NYC Standup 2011-04-07

Helps

Getting
TemplateError
can be frustrating in Rails as it tends to swallow the exception that caused it within your
template. A workaround is to wrap your template with
begin rescue end
temporarily for debugging.

Interestings

“Markdown autolinks”

JPB informed us of the existence of autolinking in Markdown, like so

<http://blog.pivotal.io>

renders

<a href="http://blog.pivotal.io">http://blog.pivotal.io</a>

resulting in http://blog.pivotal.io

“Riding dirty”

This code might not work like you expect:

obj.content.gsub!(/foo/, 'bar')

it does not set the dirty bit, so

obj.content_changed?

will return
false
.
A workaround is to police yourself and use

obj.content_will_change

before, well, changing the
content
without using the setter on
obj
.

Comments
Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *