first attempt of people crawler incl. detail view

This commit is contained in:
Marco Zeisler
2020-04-21 16:07:54 +02:00
parent e0a21f180f
commit c32819d819
11 changed files with 42 additions and 45 deletions
+10 -24
View File
@@ -5,33 +5,19 @@ class TissCrawlerController < ApplicationController
def index
end
def show_basic
def people_search
end
def show_detail
end
def search
context = params[:context]
case context
when "People"
result = TissCrawler.search(params)
@people = result.map { |person| Tiss::Person.new(person) }
# render(people_show_path, detail: false)
render template: people_show_basic_path
else
flash.write[:alert] = "Unknown search context"
end
end
require 'tiss/tiss_crawler'
def show_basic
def people_show_basic
result = TissCrawler.search(params)
@people = result.map { |person| Tiss::Person.new(person) }
# render(people_show_path, detail: false)
render template: people_show_basic_path
$people = result.map { |person| Tiss::Person.new(person) }
@people = $people
end
def people_show_detail
people = $people
index = params[:index]
@person = people[Integer(index)]
end
end