Sha256: 7b57ae6d728ec56f5dd0d456f3cf3c7d8b1857407aa49f82969764e00ae9ac0d

Contents?: true

Size: 534 Bytes

Versions: 15

Compression:

Stored size: 534 Bytes

Contents

class RhoconnectConsole::Server
  helpers do

    def login_required
      session[:token].nil?
    end
    
    def report_error(message)
      session[:errors] = [] if session[:errors].nil?
      session[:errors] << message 
    end
      
    def verify_presence_of(param,message)
      report_error(message) if params[param].nil? or params[param].length == 0
    end
    
    def verify_format_of(param,message)
      report_error(message) if params[param].nil? or params[param] !~ /^(http|https):\/\//
    end
      
  end   
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rhoconnect-3.1.2 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.1.1 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.1.0 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.1.0.beta2 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.1.0.beta1 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.0.6 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.0.5 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.0.4 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.0.3 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.0.2 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.0.1 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.0.0 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.0.0.rc1 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.0.0.beta3 lib/rhoconnect/console/app/helpers/auth_helper.rb
rhoconnect-3.0.0.beta1 lib/rhoconnect/console/app/helpers/auth_helper.rb