Class: ODDB::View::User::PowerLink

Inherits:
HtmlGrid::PassThru
  • Object
show all
Defined in:
src/view/user/powerlink.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) http_headers



19
20
21
22
23
# File 'src/view/user/powerlink.rb', line 19

def http_headers
  {
    "Location" =>  powerlink,
  }
end


11
12
13
14
15
16
17
18
# File 'src/view/user/powerlink.rb', line 11

def powerlink
  pl = @model.powerlink
  if(pl.nil? || /https?:\/\//u.match(pl))
    pl
  else
    "http://" + pl
  end
end

- (Object) to_html(context)



24
25
26
27
28
29
30
31
32
33
34
# File 'src/view/user/powerlink.rb', line 24

def to_html(context)
  line = [
    nil,
    @model.oid,
    powerlink,
    @session.remote_addr,
    nil,
  ].join(';')
  LogFile.append(:powerlink, line, Time.now)
  super
end