Class: Integral::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Includes:
Pundit
Defined in:
app/controllers/integral/application_controller.rb

Overview

Base Frontend controller

Instance Method Summary collapse

Instance Method Details

#category_path(category) ⇒ String

Returns path to category page.

Returns:

  • (String)

    path to category page



23
24
25
# File 'app/controllers/integral/application_controller.rb', line 23

def category_path(category)
  "/#{Integral.blog_namespace}/#{category.slug}"
end

#render(*args, &block) ⇒ Object

Override added as workaround for before_render Rails 5 incompatibility



15
16
17
18
# File 'app/controllers/integral/application_controller.rb', line 15

def render(*args, &block)
  before_render
  super
end