Sha256: 453e37c944262ba2a93e41b228cafb22ce86de695fd0de17e7d258e9dc3ff429

Contents?: true

Size: 862 Bytes

Versions: 24

Compression:

Stored size: 862 Bytes

Contents

class Application < Rhosync::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

24 entries across 24 versions & 1 rubygems

Version Path
rhosync-2.1.18.beta2 generators/templates/application/application.rb
rhosync-2.1.18.beta1 generators/templates/application/application.rb
rhosync-2.1.17 generators/templates/application/application.rb
rhosync-2.1.17.beta7 generators/templates/application/application.rb
rhosync-2.1.17.beta6 generators/templates/application/application.rb
rhosync-2.1.17.beta5 generators/templates/application/application.rb
rhosync-2.1.17.beta4 generators/templates/application/application.rb
rhosync-2.1.17.beta3 generators/templates/application/application.rb
rhosync-2.1.17.beta2 generators/templates/application/application.rb
rhosync-2.1.17.beta1 generators/templates/application/application.rb
rhosync-2.1.16 generators/templates/application/application.rb
rhosync-2.1.15 generators/templates/application/application.rb
rhosync-2.1.14 generators/templates/application/application.rb
rhosync-2.1.13 generators/templates/application/application.rb
rhosync-2.1.12 generators/templates/application/application.rb
rhosync-2.1.11 generators/templates/application/application.rb
rhosync-2.1.10 generators/templates/application/application.rb
rhosync-2.1.7 generators/templates/application/application.rb
rhosync-2.1.6 generators/templates/application/application.rb
rhosync-2.1.3 generators/templates/application/application.rb