Skip to content

Instantly share code, notes, and snippets.

@alvises
Created June 26, 2015 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alvises/dd71212c9848b6c06710 to your computer and use it in GitHub Desktop.
Save alvises/dd71212c9848b6c06710 to your computer and use it in GitHub Desktop.
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