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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -