All this code is specific to admin/grading_methods so move it into separate file : app/assets/javascripts/admin/grading_methods.coffee and make it  the OOP way like the other files ;)