Variables output in views?

Hi, I usually always dea with arrays this is the first time I have to
deal with a regular variable… so I have in my method:
def online
@online = Status.count_by_sql “SELECT COUNT(*) FROM status WHERE
status = ‘online’;”

and in my layout view I have
<%= @online %>

and nothing comes up… :frowning:

What im doing wrong?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs