Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class HomeController < ApplicationController
- def index
- @lottery_number_all = (1..45).to_a
- @pick = @lottery_number_all.sample(6).sort
- @pick1 = @pick[0]
- @pick2 = @pick[1]
- @pick3 = @pick[2]
- @pick4 = @pick[3]
- @pick5 = @pick[4]
- @pick6 = @pick[5]
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement