I use rails g scaffold to create a new group of controller, model and view, which allows users to input a int number. They can only edit the only number but not create a new one or delete it.
rails g scaffold number numa:integer
I would like to monitor what users input, and compare the number and call a function in another controller which I have already created before. However, I am quite new to rails on ruby, and do not have any idea about how to do that?
What I am pretty sure is that what users input will be stored in the a table which is bind with the new scaffold. The table's name is 'numbers', and the only inputbox for the only number's name is "numa". What should I do in another controller (lets call it "foods_controller.rb") to access the number. Maybe numbers.numa
?