Ruby Ruby on Rails 5 Basics Using the Rails Console Rails Console: Updating Model Objects

regarding api in rails

I am making a barcode scanner Api using rails , but I dont know java script. How do I make it ?