6
Kiedy próbuję to zrobić w Sinatra,błąd zdarza się, gdy próbuję „ALL” metody w 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
Zwraca ten błąd,
ERROR: undefined method `bytesize' for #<Comment:0x13a2248>
Czy ktoś może wskazać mi w dobrym kierunku ?
Dzięki,