extract code to methods to reduce complexity, rubocop cleanup
extract code to methods to reduce complexity, rubocop cleanup

activescaffold/active_scaffold,activescaffold/active_scaffold,activescaffold/active_scaffold