Skip to content

Commit dbfd05e

Browse files
a refactoring of unless into if for license check resolves #1187
1 parent 3e5598c commit dbfd05e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

BrainPortal/app/controllers/application_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def check_license_agreements #check portal
137137
license_agreement, portal = need_sign_license
138138
return true if params[:controller] =~ /portal$/ && params[:action] =~ /license$/
139139
return true if params[:controller] =~ /users/ && (params[:action] == "change_password" || params[:action] == "update")
140-
unless license_agreement.blank?
140+
if license_agreement.present?
141141
if File.exists?(Rails.root + "public/licenses/#{license_agreement}.html")
142142
respond_to do |format|
143143
format.html { redirect_to :controller => portal, :action => :show_license, :license => license_agreement }

0 commit comments

Comments
 (0)