end
post '/' do
- @grito = Grito.new(:title => params[:title], :text => params[:text])
- @grito.save
+ @grito = Grito.create(:title => params[:title], :text => params[:text])
haml :index
end
rpr_filepath = tmpfile.path + '.png'
RQR::QRCode.create do |qr|
- qr.save('http://grita.heroku.com/'+params[:grito], rpr_filepath)
+ qr.save('http://#{request.host}/'+params[:grito], rpr_filepath)
end
buffer = File.open(rpr_filepath).read