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
Post a Comment