I’m trying to create an if statement so that if there are no records found, a default message is displayed. I currently have this:
- if @n == nil || @n ==""
welcome
- else
- @n.each do |n|
= n.name
= raw " - "
= n.company
but it ignores the first line and just shows the record when necessary.
Try to query the instance variable for blank? :