Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Phrogz committed May 29, 2011
1 parent e29cc80 commit eeee3fe
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions helpers/partials.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@

module Sinatra
module PartialPartials
ENV_PATHS = %w[ REQUEST_PATH PATH_INFO REQUEST_URI ]
def spoof_request( uri, headers=nil )
new_env = env.dup
ENV_PATHS.each{ |k| new_env[k] = uri.to_s }
new_env.merge!(headers) if headers
call( new_env ).last.join
def local_get(url)
call(env.merge("PATH_INFO" => url)).last.join
end

def partial( page, variables={} )
Expand Down

0 comments on commit eeee3fe

Please sign in to comment.