Production fixes
This commit is contained in:
@@ -27,10 +27,10 @@ private
|
|||||||
end
|
end
|
||||||
|
|
||||||
def layout_by_resource
|
def layout_by_resource
|
||||||
if devise_controller?
|
#if devise_controller?
|
||||||
return 'obtain_token' if session[:user_return_to].present?
|
#return 'obtain_token' if session[:user_return_to].present? # resource_name == :user ????
|
||||||
return 'theme1' if session[:supplier_return_to].present?
|
#return 'theme1' if session[:supplier_return_to].present?
|
||||||
end
|
#end
|
||||||
"theme1"
|
"theme1"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -158,4 +158,9 @@ module ApplicationHelper
|
|||||||
I18n.locale == I18n.default_locale ? '/' : "/#{I18n.locale}"
|
I18n.locale == I18n.default_locale ? '/' : "/#{I18n.locale}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def link_to_function(title, function, options={})
|
||||||
|
options[:onclick] = function
|
||||||
|
link_to title, 'javascript:void(0)', options
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
+8
-4
@@ -45,7 +45,12 @@ namespace :deploy do
|
|||||||
task :restart do
|
task :restart do
|
||||||
on roles(:app), in: :sequence, wait: 5 do
|
on roles(:app), in: :sequence, wait: 5 do
|
||||||
# Your restart mechanism here, for example:
|
# Your restart mechanism here, for example:
|
||||||
|
within release_path do
|
||||||
|
#execute :rake, 'cache:clear', as: 'www-data'
|
||||||
|
execute :rake, 'dedigest_assets', as: 'www-data'
|
||||||
|
end
|
||||||
execute :chown, "-R www-data:www-data", release_path
|
execute :chown, "-R www-data:www-data", release_path
|
||||||
|
execute :chown, "-R www-data:www-data", release_path.join('public/assets/')
|
||||||
execute :touch, release_path.join('tmp/restart.txt')
|
execute :touch, release_path.join('tmp/restart.txt')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -55,10 +60,9 @@ namespace :deploy do
|
|||||||
after :restart, :clear_cache do
|
after :restart, :clear_cache do
|
||||||
on roles(:web), in: :groups, limit: 3, wait: 10 do
|
on roles(:web), in: :groups, limit: 3, wait: 10 do
|
||||||
# Here we can do anything such as:
|
# Here we can do anything such as:
|
||||||
within release_path do
|
#within release_path do
|
||||||
#execute :rake, 'cache:clear', as: 'www-data'
|
##execute :rake, 'cache:clear', as: 'www-data'
|
||||||
execute :rake, 'dedigest_assets', as: 'www-data'
|
#end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user