Did you try this with release_id not set? Not sure how the shell will deal with a nil or undefined value there. It might be safer to do the logic inside the erb tags.  That said, if you tried it and it works, leave it.