Class: Effective::PermalinksController

Inherits:
ApplicationController
  • Object
show all
Includes:
CrudController
Defined in:
app/controllers/effective/permalinks_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



5
6
7
8
9
10
11
# File 'app/controllers/effective/permalinks_controller.rb', line 5

def show
  @permalink = Effective::Permalink.find_by! slug: params[:slug]

  authorize! :show, @permalink

  redirect_to redirect_path_for(@permalink), allow_other_host: (@permalink.target == :url)
end