I need the results of a custom SQL query to create a list in a view.
Thats the query:
@classes = ActiveRecord::Base.connection.execute “SELECT DISTINCT CLASS
And thats the part of the view:
<% for class_name in @classes do %>
- <%= class_name %> <% end %>
but @classes is always NULL here…
What am I doing wrong?