Add custom GET Parameter logic to restful class in Ruby on Rails -
i have userscontroller , registrationscontroller handle user signups devise in rails.
i adding code affiliate sign ups, in order map users affiliates using custom http parameter called "a".
so example, want sign respond this: www.app.com/users/sign_up?a=affiliate_code
however, rails doesn't respond params[:a] in controller. in routing file, have resources :users
what easiest , rails way implement this?
you need setup action sign_up in routes.rb or can use default new method create user. should params 'a' without problem.
Comments
Post a Comment