Module: ODDB::Html::View::Snapback

Instance Method Summary collapse

Instance Method Details

#snapback(model) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/oddb/html/view/snapback.rb', line 10

def snapback(model)
  if(query = @session.persistent_user_input(:query))
    link = HtmlGrid::Link.new(:result, model, @session, self)
    link.href = @lookandfeel._event_url(:search, [ :query, query ])
    link
  else
    link = HtmlGrid::Link.new(:home, model, @session, self)
    link.href = @lookandfeel._event_url(:home)
    link
  end
end