Class: Unsakini::WebController

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

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



21
22
23
24
25
# File 'app/controllers/unsakini/web_controller.rb', line 21

def app
  gem_root = File.expand_path '../../../..', __FILE__

  render file: "#{gem_root}/public/unsakini/app/index.html", layout: false
end

#indexObject

Renders welcome page



9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/unsakini/web_controller.rb', line 9

def index
  @project = 'Unsakini'
  @description = 'Privacy. Confidentiality. Security.'
  @version = 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