I have a database table that has a column that I need as an array.
I've gathered the records I need with:
app.rb
@liquor = Venue.find(@venue.id).liquors_venues.where(:venue_id => @venue.id)
and I can view the data I want with:
view.erb
<% @liquor.each do |liquor| %> <%= liquor.liquor_id %><% end %>
This only gives me the data I want by running the loop. I really need @liquor.liquor_id, but as liquor_id is in a subarray, it's inaccessible. I need an array so I can run this code to determine whether a checkbox is checked or not:
view.erb
<%= @liquor.include?(vodka.id) ? "checked" : "" %>
