I’ve a problem. I’d like to refactoring code. I generate two controllers
with scaffold (student_controller, customer_controller). Actually, I
have some duplicated code.
How can I simplify the code of the controllers? Can I make a new
controller (human_controller) and move the duplicated code into these?
CustomerController < HumanController
StudentController < HumanController
HumanController < ApplicationController
Does it give any other solutions and how can I do this?
Thanks for your help!