Sha256: 2648a128dc4a1892ff83c50ae3f0387ca47a29be4267e80eb69a825009c29861
Contents?: true
Size: 998 Bytes
Versions: 13
Compression:
Stored size: 998 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 def ans_authenticate(username,password) puts "ans_authenticate - user: #{username} password: #{password}" true end end end Application.initializer(ROOT_PATH)
Version data entries
13 entries across 13 versions & 1 rubygems