diff --git a/.gitignore b/.gitignore
index 31b9df2..1a37534 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@
*.swp
*~
dump.rdb
+/db
diff --git a/app.rb b/app.rb
index 5088ae9..4788e72 100644
--- a/app.rb
+++ b/app.rb
@@ -731,6 +731,26 @@ class App < Sinatra::Base
end
end
+ get '/db/organization_departments/:id' do
+ @organization_department = Ronin::DB::OrganizationDepartment.find(params[:id])
+
+ if @organization_department
+ erb :"db/organizations/departments/show"
+ else
+ halt 404
+ end
+ end
+
+ get '/db/organization_members/:id' do
+ @organization_member = Ronin::DB::OrganizationMember.find(params[:id])
+
+ if @organization_member
+ erb :"db/organizations/members/show"
+ else
+ halt 404
+ end
+ end
+
get '/db/people' do
@pagy, @people = pagy(Ronin::DB::Person)
diff --git a/scripts/console b/scripts/console
index 683fa2d..053772d 100755
--- a/scripts/console
+++ b/scripts/console
@@ -1,3 +1,7 @@
#!/usr/bin/env bash
+if [[ -z "$DATABASE_URL" ]] && [[ -n "$DATABASE_NAME" ]]; then
+ export DATABASE_URL="sqlite3:db/dev.sqlite3"
+fi
+
bundle exec irb -Ilib -r ./app.rb
diff --git a/views/db/organizations/departments/show.erb b/views/db/organizations/departments/show.erb
new file mode 100644
index 0000000..074e161
--- /dev/null
+++ b/views/db/organizations/departments/show.erb
@@ -0,0 +1,82 @@
+<% content_for :breadcrumbs do %>
+
+<% end %>
+
+
Organization Department: <%=h @organization_department %>
+
+
diff --git a/views/db/organizations/members/show.erb b/views/db/organizations/members/show.erb
new file mode 100644
index 0000000..3bd0de9
--- /dev/null
+++ b/views/db/organizations/members/show.erb
@@ -0,0 +1,87 @@
+<% content_for :breadcrumbs do %>
+
+<% end %>
+
+Organization Member: <%=h @organization_member.person %>
+
+
diff --git a/views/db/organizations/show.erb b/views/db/organizations/show.erb
index dd077de..300f28c 100644
--- a/views/db/organizations/show.erb
+++ b/views/db/organizations/show.erb
@@ -57,7 +57,7 @@
Members: |
<% @organization.members.each do |member| %>
- <%=h member %>
+ <%=h member.person %>
<% end %>
|