Quando provo a fare questo in Sinatra,errore si verifica quando provo "tutto" metodo DataMapper
class Comment include DataMapper::Resource property :id, Serial property :body, Text property :created_at, DateTime end get '/show' do comment = Comment.all @comment.each do |comment| "#{comment.body}" end end
Esso restituisce questo errore,
ERROR: undefined method `bytesize' for #<Comment:0x13a2248>
Qualcuno mi potrebbe indicare la giusta direzione ?
Grazie,