Sha256: 00997c002a5ad3786e940921bb913aaaaaf376cdff262705e18d262b7dfbe5f6

Contents?: true

Size: 865 Bytes

Versions: 58

Compression:

Stored size: 865 Bytes

Contents

class Application < Rhoconnect::Base
  class << self
    def authenticate(username,password,session)
      true # do some interesting authentication here...
    end
    
    # Add hooks for application startup here
    # Don't forget to call super at the end!
    def initializer(path)
      super
    end
    
    # Calling super here returns rack tempfile path:
    # i.e. /var/folders/J4/J4wGJ-r6H7S313GEZ-Xx5E+++TI
    # Note: This tempfile is removed when server stops or crashes...
    # See http://rack.rubyforge.org/doc/Multipart.html for more info
    # 
    # Override this by creating a copy of the file somewhere
    # and returning the path to that file (then don't call super!):
    # i.e. /mnt/myimages/soccer.png
    def store_blob(object,field_name,blob)
      super #=> returns blob[:tempfile]
    end
  end
end

Application.initializer(ROOT_PATH)

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
rhoconnect-7.6.0 spec/apps/emptyapp/application.rb
rhoconnect-7.5.1 spec/apps/emptyapp/application.rb
rhoconnect-7.4.1 spec/apps/emptyapp/application.rb
rhoconnect-7.1.17 spec/apps/emptyapp/application.rb
rhoconnect-6.2.0 spec/apps/emptyapp/application.rb
rhoconnect-6.0.11 spec/apps/emptyapp/application.rb
rhoconnect-5.5.18 spec/apps/emptyapp/application.rb
rhoconnect-5.5.17 spec/apps/emptyapp/application.rb
rhoconnect-5.5.15 spec/apps/emptyapp/application.rb
rhoconnect-5.5.0.22 spec/apps/emptyapp/application.rb
rhoconnect-5.5.2 spec/apps/emptyapp/application.rb
rhoconnect-5.5.0.7 spec/apps/emptyapp/application.rb
rhoconnect-5.5.0.3 spec/apps/emptyapp/application.rb
rhoconnect-5.5.0 spec/apps/emptyapp/application.rb
rhoconnect-5.1.1 spec/apps/emptyapp/application.rb
rhoconnect-4.0.4 spec/apps/emptyapp/application.rb
rhoconnect-4.0.3 spec/apps/emptyapp/application.rb
rhoconnect-4.0.2 spec/apps/emptyapp/application.rb
rhoconnect-4.0.1 spec/apps/emptyapp/application.rb
rhoconnect-4.0.0 spec/apps/emptyapp/application.rb