I'm integrating my first Ember application in a Rails project. I have added the ember-cli-rails gem and ran the initializer so that I have a config/initializers/ember.rb file that looks like this:
EmberCLI.configure do |c|
c.app :products, path: 'products'
end
My Ember application is in my Rails app root and is called products. I have done nothing other than generate a default Ember application for now.
I have created a specific layout for ProductsController in Rails. It's app/views/products.html.erb. I have added the following lines:
<%= include_ember_script_tags :products %>
<%= include_ember_stylesheet_tags :products %>
The index page comes up fine for this controller. And it's loading the Ember files, but I am receiving this message in the JS console:
Uncaught UnrecognizedURLError: /products
Note that I had changed the default :frontend name in my Rails files to :products, but I haven't changed anything from the default Ember application and I realize I'm probably missing something very basic in my first Ember application here. Thank you very sincerely for any help you can offer.
Aucun commentaire:
Enregistrer un commentaire