Fix helper issues
This commit is contained in:
+3
-3
@@ -94,7 +94,7 @@ GEM
|
||||
xpath (~> 2.0)
|
||||
climate_control (0.0.3)
|
||||
activesupport (>= 3.0)
|
||||
cocaine (0.5.5)
|
||||
cocaine (0.5.7)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
coderay (1.1.0)
|
||||
coffee-script (2.3.0)
|
||||
@@ -144,7 +144,7 @@ GEM
|
||||
mime-types (1.25.1)
|
||||
mini_portile (0.6.2)
|
||||
minitest (5.5.1)
|
||||
multi_json (1.10.1)
|
||||
multi_json (1.11.0)
|
||||
nokogiri (1.6.6.2)
|
||||
mini_portile (~> 0.6.0)
|
||||
paperclip (4.2.1)
|
||||
@@ -212,7 +212,7 @@ GEM
|
||||
rspec-mocks (~> 3.2.0)
|
||||
rspec-support (~> 3.2.0)
|
||||
rspec-support (3.2.2)
|
||||
sass (3.4.12)
|
||||
sass (3.4.13)
|
||||
sass-rails (5.0.1)
|
||||
railties (>= 4.0.0, < 5.0)
|
||||
sass (~> 3.1)
|
||||
|
||||
@@ -26,6 +26,7 @@ module Cmtool
|
||||
current_user
|
||||
end
|
||||
end
|
||||
helper_method :cmtool_user
|
||||
|
||||
def check_environment
|
||||
@cmtool_warnings ||= []
|
||||
|
||||
@@ -113,6 +113,10 @@ module Cmtool
|
||||
format("%.2f",n) + %w(B KB MB GB TB)[count]
|
||||
end
|
||||
|
||||
def cmtool_user
|
||||
controller.send :cmtool_user
|
||||
end
|
||||
|
||||
def edit_td(obj)
|
||||
content_tag(
|
||||
:td,
|
||||
|
||||
@@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base
|
||||
private
|
||||
|
||||
def authorize_cmtool
|
||||
redirect_to new_user_session_path unless current_user.present?
|
||||
redirect_to main_app.new_user_session_path unless current_user.present?
|
||||
end
|
||||
|
||||
def cmtool_user
|
||||
|
||||
Reference in New Issue
Block a user