I connect to database and change db.results_as_hash to true
db = SQLite3::Database.new 'barbershop.sqlite'
db.results_as_hash = true
But it don't display hash, it is simple array. And don't work
<% @results.each do |row| %>
<tr>
<td><%= row['Name'] %></td>
Working code is
<% @results.each do |row| %>
<tr>
<td><%= row[1] %></td>
Error is "no implicit conversion of String into Integer"
What's wrong?
Ruby 2.1.5p273, SQLite version 3.8.5, MacOS X Yosemite