rubocop
added active_record helpers
middleware definition and configuration changes