You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
473 B
Ruby
20 lines
473 B
Ruby
class HomeController < ApplicationController
|
|
def show
|
|
@title = "Share Your Terminal With No Fuss"
|
|
|
|
if home_asciicast_id = CFG['HOME_CAST_ID']
|
|
asciicast = Asciicast.find(home_asciicast_id)
|
|
else
|
|
asciicast = Asciicast.order("created_at DESC").first
|
|
end
|
|
|
|
if asciicast
|
|
@asciicast = AsciicastDecorator.new(asciicast)
|
|
end
|
|
|
|
@asciicasts = AsciicastDecorator.decorate(
|
|
Asciicast.order("created_at DESC").limit(9)
|
|
)
|
|
end
|
|
end
|