Sha256: 93ce74412b9519261dc0cd1fe31b4b587f58186901071c83147b965f0f6307f3

Contents?: true

Size: 890 Bytes

Versions: 14

Compression:

Stored size: 890 Bytes

Contents

class Kiss
  module KissAccessors
    # Escapes string for use in URLs.
    def url_escape(string)
      string.url_escape
    end
    alias_method :u, :url_escape
    alias_method :escape, :url_escape
    alias_method :url_encode, :url_escape
    alias_method :escape_url, :url_escape
    
    # Encodes string for output to HTML.
    def html_escape(string)
      string.html_escape
    end
    alias_method :h, :html_escape
    alias_method :escape_html, :html_escape
  end
  
  module ControllerAccessors
    def environment
      controller.environment
    end
  
    def public_dir
      controller.public_dir
    end
  
    def upload_dir
      controller.upload_dir
    end
    
    def database
      controller.database
    end
    
    def models
      controller.models
    end
    alias_method :dbm, :models
    
    
    # request data
    
    include KissAccessors
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
kiss-1.8.9 lib/kiss/accessors/controller.rb
kiss-1.8.8 lib/kiss/accessors/controller.rb
kiss-1.8.7 lib/kiss/accessors/controller.rb
kiss-1.8.6 lib/kiss/accessors/controller.rb
kiss-1.8.5 lib/kiss/accessors/controller.rb
kiss-1.8.4 lib/kiss/accessors/controller.rb
kiss-1.8.3 lib/kiss/accessors/controller.rb
kiss-1.8.2 lib/kiss/accessors/controller.rb
kiss-1.8.1 lib/kiss/accessors/controller.rb
kiss-1.8 lib/kiss/accessors/controller.rb
kiss-1.7.4 lib/kiss/accessors/controller.rb
kiss-1.7.2 lib/kiss/accessors/controller.rb
kiss-1.7.1 lib/kiss/accessors/controller.rb
kiss-1.7 lib/kiss/accessors/controller.rb