 @App.NewFeedView = Ember.View.extend
 	click: ->
 		console.log('new feed view')
+
 		@set('controller.urlPrompt', true)
+		Ember.run.next(=>
+			@$('input').focus()
+		)
 	keyUp: (e)->
-		url = @get('controller.newFeedUrl');
+		url = @get('controller.newFeedUrl')
+		if e.keyCode == 13 && !!url
+			console.log 'create record'
+			feed = app.Feed.createRecord {titel: 'test', url: url}
+			feed.save().then(=>
+				console.log 'saved the feed...'
+				@set('controller.urlPrompt', false)
+				@set('controller.newFeedUrl', null)
+			)
+
 		# if e.keyCode == 13 && !!url
 		# 	@get('controller').newFeed {"url": encodeURIComponent(url)}
@App.Item = DS.Model.extend
	title        : DS.attr 'string'
	url          : DS.attr 'string'

	html         : DS.attr 'stirng'


@App.Feed = DS.Model.extend
	title      : DS.attr 'string'
	url        : DS.attr 'string'
	created_at : DS.attr 'date'
