Class: RedirectsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/redirects_controller.rb

Instance Method Summary collapse

Instance Method Details

#byeObject


2
3
4
5
6
7
8
9
# File 'app/controllers/redirects_controller.rb', line 2

def bye
  @url = params[:url]

  days = params[:days] || 7
  @posts = Post.newer_than(days.to_i.days.ago).order('views DESC').limit(20)

  expires_in(30.minutes, public: true)
end