ruby - create a unique number using Rails 3 -


i need create random number each time page loaded. have view page below.

index.html.erb:

<th style="width: 30%; text-align:left; vertical-align: top;">date: <%= date.today.to_s %><br />                     bill no.: </th>   

in file, want create new unique bill number each time page loaded. please me resolve error.

<th style="width: 30%; text-align:left; vertical-align: top;">date: <%= date.today.to_s %><br />                 bill no.: <%= rand(10000) %></th>   

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -