Created
June 26, 2015 09:57
-
-
Save alvises/dd71212c9848b6c06710 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def import | |
params[:import] | |
begin | |
Learner.import(params[:file], current_user) | |
rescue Exception => e | |
render json: e and return | |
end | |
redirect_to groups_path, notice: "Successfully imported!" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment