9 lines
285 B
Ruby
9 lines
285 B
Ruby
class HomeController < ApplicationController
|
|
def show
|
|
offset = (Asciicast.featured.count * rand).to_i
|
|
asciicast = Asciicast.featured.offset(offset).first ||
|
|
Asciicast.order("created_at DESC").first
|
|
@asciicast = AsciicastDecorator.new(asciicast)
|
|
end
|
|
end
|