summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 21:47:37 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 21:47:37 +0100
commita518270dbafa6eb9265c4124ca2887149c3de362 (patch)
tree0fee7e664d57b2b057d556f0d3ac6fd29737ee52
parent9ffaaeeb42b364f2c7d9b7d17a272c530f546c83 (diff)
parent046ce09895a08778c971052f6d22ecd6422aee6d (diff)
Merge branch 'develop' of github.com:amooma/GS5 into develop
-rw-r--r--app/views/call_routes/show.html.haml8
-rw-r--r--config/unicorn.rb35
2 files changed, 42 insertions, 1 deletions
diff --git a/app/views/call_routes/show.html.haml b/app/views/call_routes/show.html.haml
index 31c3cb0..c5c7397 100644
--- a/app/views/call_routes/show.html.haml
+++ b/app/views/call_routes/show.html.haml
@@ -16,4 +16,10 @@
%strong= t('call_routes.show.position') + ":"
= @call_route.position
-= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @call_route } \ No newline at end of file
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @call_route }
+
+%h3= t('route_elements.index.page_title')
+- if @call_route.route_elements && @call_route.route_elements.count > 0
+ = render "route_elements/index_core", :route_elements => @call_route.route_elements
+
+= render :partial => 'shared/create_link', :locals => { :parent => @call_route, :child_class => RouteElement }
diff --git a/config/unicorn.rb b/config/unicorn.rb
new file mode 100644
index 0000000..d379569
--- /dev/null
+++ b/config/unicorn.rb
@@ -0,0 +1,35 @@
+worker_processes 2
+working_directory "/opt/GS5/"
+
+# This loads the application in the master process before forking
+# worker processes
+# Read more about it here:
+# http://unicorn.bogomips.org/Unicorn/Configurator.html
+preload_app true
+
+timeout 30
+
+# This is where we specify the socket.
+# We will point the upstream Nginx module to this socket later on
+listen "/opt/GS5/tmp/sockets/unicorn.sock", :backlog => 64
+
+pid "/opt/GS5/tmp/pids/unicorn.pid"
+
+# Set the path of the log files inside the log folder of the testapp
+stderr_path "/opt/GS5/log/unicorn.stderr.log"
+stdout_path "/opt/GS5/log/unicorn.stdout.log"
+
+before_fork do |server, worker|
+# This option works in together with preload_app true setting
+# What is does is prevent the master process from holding
+# the database connection
+ defined?(ActiveRecord::Base) and
+ ActiveRecord::Base.connection.disconnect!
+end
+
+after_fork do |server, worker|
+# Here we are establishing the connection after forking worker
+# processes
+ defined?(ActiveRecord::Base) and
+ ActiveRecord::Base.establish_connection
+end