Sha256: 74af6ad26f07c62449fc84be4bc1b189a9225d8b6b9e9c001e85b591a5d8bee5

Contents?: true

Size: 862 Bytes

Versions: 22

Compression:

Stored size: 862 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(obj,field_name,blob)
      super #=> returns blob[:tempfile]
    end
  end
end

Application.initializer(ROOT_PATH)

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rhoconnect-3.2.1 examples/simple/application.rb
rhoconnect-3.2.0 examples/simple/application.rb
rhoconnect-3.2.0.beta5 examples/simple/application.rb
rhoconnect-3.2.0.beta4 examples/simple/application.rb
rhoconnect-3.2.0.beta3 examples/simple/application.rb
rhoconnect-3.2.0.beta2 examples/simple/application.rb
rhoconnect-3.2.0.beta1 examples/simple/application.rb
rhoconnect-3.1.2 examples/simple/application.rb
rhoconnect-3.1.1 examples/simple/application.rb
rhoconnect-3.1.0 examples/simple/application.rb
rhoconnect-3.1.0.beta2 examples/simple/application.rb
rhoconnect-3.1.0.beta1 examples/simple/application.rb
rhoconnect-3.0.6 examples/simple/application.rb
rhoconnect-3.0.5 examples/simple/application.rb
rhoconnect-3.0.4 examples/simple/application.rb
rhoconnect-3.0.3 examples/simple/application.rb
rhoconnect-3.0.2 examples/simple/application.rb
rhoconnect-3.0.1 examples/simple/application.rb
rhoconnect-3.0.0 examples/simple/application.rb
rhoconnect-3.0.0.rc1 examples/simple/application.rb