removed coffe script scaffold
refactored query to active record model
fixed rubocop