Class: Admin::AdminController

Inherits:
Tolaria::TolariaController show all
Defined in:
app/controllers/admin/admin_controller.rb

Instance Method Summary collapse

Instance Method Details



14
15
16
17
18
19
# File 'app/controllers/admin/admin_controller.rb', line 14

def help_link
  @help_link = Tolaria.help_links.find do |help_link|
    help_link.slug == params[:slug]
  end or raise ActiveRecord::RecordNotFound
  return render tolaria_template("help/help_link")
end

#markdownObject



9
10
11
12
# File 'app/controllers/admin/admin_controller.rb', line 9

def markdown
  return head(404) unless current_administrator.present?
  return render(inline:Tolaria.render_markdown(request.raw_post))
end

#rootObject



5
6
7
# File 'app/controllers/admin/admin_controller.rb', line 5

def root
  redirect_to(Tolaria.config.default_redirect, status:303)
end