Use decorator for asciicast on homepage
parent
e84f1eb349
commit
4cc0cb31a6
@ -1,6 +1,7 @@
|
|||||||
class HomeController < ApplicationController
|
class HomeController < ApplicationController
|
||||||
def show
|
def show
|
||||||
offset = (Asciicast.featured.count * rand).to_i
|
offset = (Asciicast.featured.count * rand).to_i
|
||||||
@asciicast = Asciicast.featured.offset(offset).first || @asciicasts.first
|
asciicast = Asciicast.featured.offset(offset).first || @asciicasts.first
|
||||||
|
@asciicast = AsciicastDecorator.new(asciicast)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue