Closed seanpdoyle closed 8 years ago
@rondale-sc what are your thoughts on this?
What was the reasoning behind making this addon only consist of index.js
?
In a future PR, I'd love to add an initializer to configure CSRF, a la ember-rails:
$.ajaxPrefilter(function(options, originalOptions, xhr) {
var token = $('meta[name="csrf-token"]').attr('content');
xhr.setRequestHeader('X-CSRF-Token', token);
});
The current setup doesn't allow for exposing file from app/
Oh wow, I'm mistaken.
Including app/initializers/csrf.js
in the bare repo is picked up by the host application.
Having said that, what do you think about making this a full-blown addon?
https://github.com/rondale-sc/ember-cli-rails-addon/pull/19 is an alternative
Closing for now in an effort to keep the repo slim
Configure project as a full-blown
ember-cli
addon.With this new structure, we can start to expose addon-specific classes accessible from within the host application.