Guest User

Untitled

a guest
Dec 17th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. def check
  2. result = CheckCardAndUpdate.call(
  3. custom_original_text: params[:original_text],
  4. card_id: params[:id]
  5. )
  6.  
  7. @misspelling = DamerauLevenshtein.distance(params[:original_text], Card.find(params[:id]).original_text)
  8. flash[:notice] = result.message
  9. redirect_to action: :index
  10. end
Add Comment
Please, Sign In to add comment