mirror of
				https://github.com/sinatra/sinatra
				synced 2023-03-27 23:18:01 -04:00 
			
		
		
		
	* after filters
This commit is contained in:
		
							parent
							
								
									72be291da2
								
							
						
					
					
						commit
						8cc45b6a1a
					
				
					 3 changed files with 44 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,14 @@
 | 
			
		|||
$LOAD_PATH.unshift '../../lib/'
 | 
			
		||||
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../../lib/'
 | 
			
		||||
require 'sinatra'
 | 
			
		||||
 | 
			
		||||
after_attend :log_fun_stuff
 | 
			
		||||
 | 
			
		||||
helpers do
 | 
			
		||||
  def log_fun_stuff
 | 
			
		||||
    logger.debug "THIS IS COOL!"
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
get '/' do
 | 
			
		||||
  body <<-HTML
 | 
			
		||||
  <form method="POST"><input type="text" name="name"/><input type="submit"></form>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue