Ruby on Rails
Thursday, November 5, 2015
instead of this:
def rqstate
self.quote_request.status rescue "unsubmitted"
end
I'm going for this, though maybe there is a good one liner I overlooked ?
def rqstate
ret_res = "unsubmitted"
ret_res = quote_request.status || ret_res if quote_request
ret_res
end
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/cb3be5ae-83e2-41ef-90c6-3f027b61f189%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment