Guest User

Untitled

a guest
Oct 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1.  
  2. class TigirTestsController < ApplicationController
  3.  
  4. before_filter :check_new_location, :only => [:create, :update]
  5.  
  6. def new
  7. # stuff
  8. end
  9.  
  10. def create
  11. # stuff
  12. end
  13.  
  14. def edit
  15. # stuff
  16. end
  17.  
  18. def update
  19. # stuff
  20. end
  21.  
  22. private
  23.  
  24. def check_new_location
  25. if params[:new_location].to_s.strip.present? and params[:tigir_test].present?
  26. params[:tigir_test][:location] = params[:new_location]
  27. end
  28. end
  29.  
  30. end
Add Comment
Please, Sign In to add comment