Hi David, can I ask how did you implement the "Code" section besides the "Comment" area? It's perfect to show the file structure and code. Did you use a gem?
☒ It was a custom solution. I have a gitlab server which hosts the files and this site communicates to the gitlab server via their open API. I basically then list out the files and folders and display whichever file that was clicked on.
Hello there, i'm a junior developer, i would like create a search by scan qr code, i created the barcode for each pets (in my case) but i don't how can create a search in the index method, can someone help me and thanks...
actually my problem is how can i use the camera on the index method??
Hi Dave, I did everything like you did (I believe :)) ) but my camera doesn't start. I don't see any errors in my console and my canvas is displayed. What I have different is the ruby '2.4.1' and 'rails', '~> 5.2.4', '>= 5.2.4.4'. Do you think those can block my camera? Thanks
I rebuild everything in rails 6 like you have and it's working. Please help me with searching. I want something like when you scan a QRcode what exist in a product send to show page and if is not saved send to new product page. After scanning the code it give me the path of the product not the name like in your case
A QR code is really just an encoded text. There isn't really any kind of data structure to it. So it can have text like the product name or a URL to it.
The scanner doesn't work on an iPhone properly. The page is loaded and the camera image is shown, but freezes right away (it basically shows a picture instead of video). It seems like the code is still requesting the camera (green dot of camera usage is still on, and safari shows the red camera icon in the search bar), but no live feed. Both Safari and Firefox on iOS show the same behavior.
On a Windows 10 PC it works, both with Edge and Firefox. On an Android devise with Chrome, the live feed works, but the image is stretched.
I'm using Rails 7 + Ruby 3.1. and used the Yarn install. This test is on a production server.
Maybe I should add the following: I'm using Esbuild as bundler. I also tried to use a cdn instead of the Yarn install but can't get it to work (I'm a beginner at this)
on the iphone, you should be able to hook it up to a mac via the lightning cable and open up the safari debugger. This would give you the ability to see any console errors in the iOS safari.
Sorry, my English is not so good.
actually my problem is how can i use the camera on the index method??
<%= form.label :name %>
<%= content_tag :div, 'data-controller': 'scanner' do %>
<%= content_tag :canvas, nil, width: 400, height: 240, 'data-scanner-target': 'canvas' %>
<%= form.text_field :name, class: 'form-control', 'data-scanner-target': 'output' %>
<% end %>
Thanks
Please help me with searching. I want something like when you scan a QRcode what exist in a product send to show page and if is not saved send to new product page.
After scanning the code it give me the path of the product not the name like in your case
Could you help me with the following?
The scanner doesn't work on an iPhone properly. The page is loaded and the camera image is shown, but freezes right away (it basically shows a picture instead of video).
It seems like the code is still requesting the camera (green dot of camera usage is still on, and safari shows the red camera icon in the search bar), but no live feed.
Both Safari and Firefox on iOS show the same behavior.
On a Windows 10 PC it works, both with Edge and Firefox. On an Android devise with Chrome, the live feed works, but the image is stretched.
I'm using Rails 7 + Ruby 3.1. and used the Yarn install. This test is on a production server.
Maybe I should add the following:
I'm using Esbuild as bundler.
I also tried to use a cdn instead of the Yarn install but can't get it to work (I'm a beginner at this)