I dig some interesting code that I'm sure is wrong. I wondered if anyone thought of the syntax that the developer was trying to use?
Heres the dummy code:
render :nothing => true and return if params[:name].nil?
My naive fix refers to my programming language:
if params[:name].nil? render :nothing => true, :status => 404 return end
Is there a more elegant, more ruby way? (semicolons do not count :)
source share