More specs for home controller
parent
1c574fca4a
commit
98d80ae1fd
@ -1,7 +1,8 @@
|
||||
class HomeController < ApplicationController
|
||||
def show
|
||||
offset = (Asciicast.featured.count * rand).to_i
|
||||
asciicast = Asciicast.featured.offset(offset).first || @asciicasts.first
|
||||
asciicast = Asciicast.featured.offset(offset).first ||
|
||||
Asciicast.order("created_at DESC").first
|
||||
@asciicast = AsciicastDecorator.new(asciicast)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue