Thursday, September 22, 2011

[Rails] how to create pgsql sequence from controller?

(Frenchy, sorry =))

Hi everyone, i'm working on a web browser based game:
every player have got some ants and i want every ants of each player
to have a unique name:

Player 1:
ant 1
ant 2
ant 3
Player 2:
ant 1
ant 2
ant 3
ant 4
...

To do that i need to create player1_seq and player2_seq and increment
the player sequence whenever the player create an ant so i need to
create sequence whenever a player subscribe.

How to do that?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate