Suppose there are two models, one is User model and other is Referral
model. The root is root :to => 'users#new. Now the user will coming
here via example.com/value, where value is the id for Referral model.
Now using this value I have to increment two fields: One is visits,
which shows how many visits did that particular url bring. Other is
signup, which will increment if there is a signup using that value.
I have passed this value via routes in users#new, which I use to
increment the visits column of Referral model. Now if the users
signup, the users#create would be executed, and I want to be able to
use the value in the create action as well, to increment the signup
column in Referral model.
As of now, I understand that the instance variable I created in new
action to store the value cannot be used in create action. Now how can
I achieve this.