Class: WebBaseController

Inherits:
ActionController::Base
  • Object
show all
Includes:
ActionController::ImplicitRender, ActionView::Layouts
Defined in:
app/controllers/web_base_controller.rb

Overview

Base controller for web pages

Instance Method Summary collapse

Instance Method Details

#appObject

Renders the angular index view when request url is /app/* to enable html5 pushState capability of angularjs



20
21
22
# File 'app/controllers/web_base_controller.rb', line 20

def app
  render file: "#{Rails.root}/public/app/index.html", layout: false
end

#indexObject

Renders welcome page



8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/web_base_controller.rb', line 8

def index
  @project = 'Unsakini'
  @description = 'Opensource Encrypted Bulletin Board'
  @version = Unsakini::VERSION
  @author = 'Adones Pitogo'
  @repository = 'https://github.com/adonespitogo/unsakini'
  @title = "#{@project} | #{@description}"
  @tagline = "Created by and for online activists, information security enthusiasts and government surveillance evaders."
  @keywords = "unsakini, encrypted, bulletin board, BB, ruby, rails"
end