Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TigirTestsController < ApplicationController
- before_filter :check_new_location, :only => [:create, :update]
- def new
- # stuff
- end
- def create
- # stuff
- end
- def edit
- # stuff
- end
- def update
- # stuff
- end
- private
- def check_new_location
- if params[:new_location].to_s.strip.present? and params[:tigir_test].present?
- params[:tigir_test][:location] = params[:new_location]
- end
- end
- end
Add Comment
Please, Sign In to add comment