 					headline: @renderer.headline "Add beerstyle"
 					mode: 'edit'
 					item: {}
-					action: "/beerStyles"
+					action: "/beerstyles"
 
 
 performEdit = (req, reply) =>

	url = req.url.path.substring(0,req.url.path.length - 5)
	@get url, (status, response) =>
		reply @renderer.page
			title: "#{response.beerStyles[0].name} - beerStyles - Beer Styles"
			navigationState: 'beerStyles'
			user: req?.auth?.credentials?.user
			html: @renderer.render
				template: "public/templates/beerStyles/index.jade"
				data: 
					type:'beerstyles' 
					headline: @renderer.headline "#{response.beerStyles[0].name}", "#{response.beerStyles[0].type}"
					mode: 'edit'
					item: response.beerStyles[0]
					action: "/beerStyles/#{response.beerStyles[0].beerstyleId}"

showNew = (req, reply) =>
	reply @renderer.page
			title: "Add - beerStyles - Ingredients"
			navigationState: 'beerStyles'
			html: @renderer.render
				template: "public/templates/beerStyles/index.jade"

	@get req.url.path, (status, response) =>
		console.log response.beerStyles
		reply @renderer.page
			title: "Beer Styles"
			navigationState: 'beerStyles'
			user: req?.auth?.credentials?.user
			html: @renderer.render
				template: "public/templates/beerstyles/index.jade"
				data: 
					type:'beerstyles' 
					headline: @renderer.headline 'beerstyles', ''
					mode: 'list'
					results: response.beerStyles

