hi,
im a new rails developper, and i try to create an action into a
controller to do something like that:
when u user purshase an item, his godparent (user contact) will receive
money.
i create the purshase controller it work fine, but i dont know how can i
add this function.
also, i had create a model to the commission:
Sadly, I cannot understand what it is you’re trying to do, or what help
you are asking for.
hi,
im a new rails developper, and i try to create an action into a
controller to do something like that:
when u user purshase an item, his godparent (user contact) will receive
money.
i create the purshase controller it work fine, but i dont know how can i
add this function.
thank you for reply:
what i want to do is when a user C make a purchase, his godparent ( user
B ) win some money and also the godparent of B ( user A).
in the users table i come to add a column named “commission”.
so when B make purchase, B.commission += 1
and A.commission += 0.5
there’s a way to do this please.
what code you want!?
Start by working right through a good rails tutorial such as railstutorial.org. That will show you the basics of Rails. Then you
will probably be able to answer your own question.
Colin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.