I've setup a Rails 4 app with Ember js using the gems provided on the site
gemfile
gem 'ember-rails'
gem 'ember-source', '1.2.0'
entries_controller.js.coffee
Tut1.EntriesController = Ember.ArrayController.extend
addEntry: ->
entry = @store.createRecord(Tut1.Entry,
name: @get('newEntryName')
winner: false
)
entry.save()
I get this error on the console.
POST http://localhost:3000/entries 422 (OK)
It's posting correctly, but rails is retuning a "ActionController::InvalidAuthenticityToken" which is confusing to me as the host, origin and referer are the same.
Host:localhost:3000
Origin:http://localhost:3000
Referer:http://localhost:3000/
Is it still cross domain? How do I authenticate this request.